Show / Hide Table of Contents

    Interface ILogLevelConfigurator

    Configure and stores the LogLevel overrides.

    Namespace: Silverback.Messaging.Configuration
    Assembly: Silverback.Core.dll
    Syntax
    public interface ILogLevelConfigurator

    Methods

    | Improve this doc View source

    Build()

    Builds the ILogLevelDictionary based on the current state of the configurator.

    Declaration
    ILogLevelDictionary Build()
    Returns
    Type Description
    ILogLevelDictionary

    The ILogLevelDictionary.

    | Improve this doc View source

    SetLogLevel(EventId, LogLevel)

    Configure the log level that should be applied to the specified event.

    Declaration
    ILogLevelConfigurator SetLogLevel(EventId eventId, LogLevel logLevel)
    Parameters
    Type Name Description
    EventId eventId

    The event id.

    LogLevel logLevel

    The log level to apply.

    Returns
    Type Description
    ILogLevelConfigurator

    The ILogLevelConfigurator so that additional calls can be chained.

    | Improve this doc View source

    SetLogLevel(EventId, Func<Exception?, LogLevel, LogLevel>)

    Configure a delegate that determines the log level that should be applied to the specified event.

    Declaration
    ILogLevelConfigurator SetLogLevel(EventId eventId, Func<Exception?, LogLevel, LogLevel> logLevelFunc)
    Parameters
    Type Name Description
    EventId eventId

    The event id.

    Func<Exception, LogLevel, LogLevel> logLevelFunc

    The function that returns the log level. It takes the logged exception and the default log level as parameters.

    Returns
    Type Description
    ILogLevelConfigurator

    The ILogLevelConfigurator so that additional calls can be chained.

    | Improve this doc View source

    SetLogLevel(EventId, Func<Exception?, LogLevel, Lazy<string>, LogLevel>)

    Configure a delegate that determines the log level that should be applied to the specified event.

    Declaration
    ILogLevelConfigurator SetLogLevel(EventId eventId, Func<Exception?, LogLevel, Lazy<string>, LogLevel> logLevelFunc)
    Parameters
    Type Name Description
    EventId eventId

    The event id.

    Func<Exception, LogLevel, Lazy<string>, LogLevel> logLevelFunc

    The function that returns the log level. It takes the logged exception, the message and the default log level as parameters.

    Returns
    Type Description
    ILogLevelConfigurator

    The ILogLevelConfigurator so that additional calls can be chained.

    • Improve this doc
    • View source
    In this article
    • Methods
      • Build()
      • SetLogLevel(EventId, LogLevel)
      • SetLogLevel(EventId, Func<Exception?, LogLevel, LogLevel>)
      • SetLogLevel(EventId, Func<Exception?, LogLevel, Lazy<string>, LogLevel>)
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini