Search Results for

    Show / Hide Table of Contents

    Interface ILogger

    The logger interface to be returned by any implementation of ILoggingImplementation

    Namespace: OpenFin.Net.Adapter.Logging
    Assembly: OpenFin.Net.Adapter.dll
    Syntax
    public interface ILogger

    Methods

    Debug(Func<String>)

    Outputs a debug level message with deferred evaluation

    Declaration
    void Debug(Func<string> message)
    Parameters
    Type Name Description
    Func<System.String> message

    The message Func

    Remarks

    Use the deferred evaluation loggers when you have output that is expensive to evaluate and you want to avoid the cost if the log level is not enabled

    Examples
    logger.Debug(() => $"This is a log message with a deferred evaluation of {someExpensiveToStringObject}");

    Debug(String)

    Outputs a debug level message

    Declaration
    void Debug(string message)
    Parameters
    Type Name Description
    System.String message

    The message.

    Debug(String, Exception)

    Outputs a debug level message with any exception information

    Declaration
    void Debug(string message, Exception exception)
    Parameters
    Type Name Description
    System.String message

    The message.

    Exception exception

    The exception.

    Error(Func<String>)

    Outputs a error level message with deferred evaluation

    Declaration
    void Error(Func<string> message)
    Parameters
    Type Name Description
    Func<System.String> message

    The message Func

    Remarks

    Use the deferred evaluation loggers when you have output that is expensive to evaluate and you want to avoid the cost if the log level is not enabled

    Examples
    logger.Error(() => $"This is a log message with a deferred evaluation of {someExpensiveToStringObject}");

    Error(String)

    Outputs an error level message

    Declaration
    void Error(string message)
    Parameters
    Type Name Description
    System.String message

    The message.

    Error(String, Exception)

    Outputs an error level message with any exception information

    Declaration
    void Error(string message, Exception exception)
    Parameters
    Type Name Description
    System.String message

    The message.

    Exception exception

    The exception.

    Fatal(Func<String>)

    Outputs a fatal level message with deferred evaluation

    Declaration
    void Fatal(Func<string> message)
    Parameters
    Type Name Description
    Func<System.String> message

    The message Func

    Remarks

    Use the deferred evaluation loggers when you have output that is expensive to evaluate and you want to avoid the cost if the log level is not enabled

    Examples
    logger.Fatal(() => $"This is a log message with a deferred evaluation of {someExpensiveToStringObject}");

    Fatal(String)

    Outputs a fatal level message

    Declaration
    void Fatal(string message)
    Parameters
    Type Name Description
    System.String message

    The message.

    Fatal(String, Exception)

    Outputs a fatal level message with any exception information

    Declaration
    void Fatal(string message, Exception exception)
    Parameters
    Type Name Description
    System.String message

    The message.

    Exception exception

    The exception.

    Information(Func<String>)

    Outputs an information level message with deferred evaluation

    Declaration
    void Information(Func<string> message)
    Parameters
    Type Name Description
    Func<System.String> message

    The message Func

    Remarks

    Use the deferred evaluation loggers when you have output that is expensive to evaluate and you want to avoid the cost if the log level is not enabled

    Examples
    logger.Information(() => $"This is a log message with a deferred evaluation of {someExpensiveToStringObject}");

    Information(String)

    Outputs an information level message

    Declaration
    void Information(string message)
    Parameters
    Type Name Description
    System.String message

    The message.

    Information(String, Exception)

    Outputs an information level message with any exception information

    Declaration
    void Information(string message, Exception exception)
    Parameters
    Type Name Description
    System.String message

    The message.

    Exception exception

    The exception.

    OnLogConfigUpdate(LogConfig)

    A logger handles this on initial creation and whenever the log configuration is updated, and must use this when evaluating deferred log expressions

    Declaration
    void OnLogConfigUpdate(LogConfig logConfig)
    Parameters
    Type Name Description
    LogConfig logConfig

    The log configuration.

    Verbose(Func<String>)

    Outputs a verbose level message with deferred evaluation

    Declaration
    void Verbose(Func<string> message)
    Parameters
    Type Name Description
    Func<System.String> message

    The message Func

    Remarks

    Use the deferred evaluation loggers when you have output that is expensive to evaluate and you want to avoid the cost if the log level is not enabled

    Examples
    logger.Verbose(() => $"This is a log message with a deferred evaluation of {someExpensiveToStringObject}");

    Verbose(String)

    Outputs a verbose level message

    Declaration
    void Verbose(string message)
    Parameters
    Type Name Description
    System.String message

    The message.

    Verbose(String, Exception)

    Outputs a verbose level message with any exception information

    Declaration
    void Verbose(string message, Exception exception)
    Parameters
    Type Name Description
    System.String message

    The message.

    Exception exception

    The exception.

    Warning(Func<String>)

    Outputs a warning level message with deferred evaluation

    Declaration
    void Warning(Func<string> message)
    Parameters
    Type Name Description
    Func<System.String> message

    The message Func

    Remarks

    Use the deferred evaluation loggers when you have output that is expensive to evaluate and you want to avoid the cost if the log level is not enabled

    Examples
    logger.Warning(() => $"This is a log message with a deferred evaluation of {someExpensiveToStringObject}");

    Warning(String)

    Outputs a warning level message

    Declaration
    void Warning(string message)
    Parameters
    Type Name Description
    System.String message

    The message.

    Warning(String, Exception)

    Outputs a warning level message with any exception information

    Declaration
    void Warning(string message, Exception exception)
    Parameters
    Type Name Description
    System.String message

    The message.

    Exception exception

    The exception.

    In This Article
    Back to top Copyright OpenFin