Search Results for

    Show / Hide Table of Contents

    Class ILoggerExtensions

    This extension class shortens log method calls.

    Inheritance
    System.Object
    ILoggerExtensions
    Namespace: TeleScope.Logging.Metrics.Extensions
    Assembly: TeleScope.Logging.Metrics.dll
    Syntax
    public static class ILoggerExtensions : object

    Methods

    | Improve this Doc View Source

    Metrics(ILogger, LogLevel, Boolean, String, Object[])

    Writes the metrics execution time and total memory usage to the logger.

    Declaration
    public static IDisposable Metrics(this ILogger logger, LogLevel level, bool forceGarbageCollection, string message, params object[] args)
    Parameters
    Type Name Description
    ILogger logger

    The calling instance.

    LogLevel level

    The minimum log level for logging the metrics.

    System.Boolean forceGarbageCollection

    Determines if the will perform a full memory collection or not.

    System.String message

    The client-side message.

    System.Object[] args

    Optional data arguments that should appear in the message.

    Returns
    Type Description
    IDisposable

    The metrics instance as .

    | Improve this Doc View Source

    Metrics(ILogger, String)

    Writes the metrics execution time and total memory usage to the logger. The is set to . The will not be forced to perform a full memory collection in order to optimize the execution time.

    Declaration
    public static IDisposable Metrics(this ILogger logger, string message = "")
    Parameters
    Type Name Description
    ILogger logger

    The calling instance.

    System.String message

    The client-side message that contains the calling member name. If not present the message will only contain the name of the calling member .

    Returns
    Type Description
    IDisposable

    The metrics instance as .

    • GITHUB
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top
    Copyright 2020-2022 TeleScope-dotnet. Generated by DocFX.
    ☀
    ☾