Table of Contents

Class LogLevelConfigurator

Namespace
Silverback.Diagnostics
Assembly
Silverback.Core.dll

Configure and stores the LogLevel overrides.

public sealed class LogLevelConfigurator
Inheritance
LogLevelConfigurator
Inherited Members

Constructors

LogLevelConfigurator()

public LogLevelConfigurator()

Methods

SetLogLevel(EventId, LogLevel)

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

public LogLevelConfigurator SetLogLevel(EventId eventId, LogLevel logLevel)

Parameters

eventId EventId

The event id.

logLevel LogLevel

The log level to apply.

Returns

LogLevelConfigurator

The LogLevelConfigurator so that additional calls can be chained.

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

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

public LogLevelConfigurator SetLogLevel(EventId eventId, Func<Exception?, LogLevel, LogLevel> logLevelFunc)

Parameters

eventId EventId

The event id.

logLevelFunc Func<Exception, LogLevel, LogLevel>

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

Returns

LogLevelConfigurator

The LogLevelConfigurator so that additional calls can be chained.

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

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

public LogLevelConfigurator SetLogLevel(EventId eventId, Func<Exception?, LogLevel, Lazy<string>, LogLevel> logLevelFunc)

Parameters

eventId EventId

The event id.

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

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

Returns

LogLevelConfigurator

The LogLevelConfigurator so that additional calls can be chained.