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 sourceBuild()
Builds the ILogLevelDictionary based on the current state of the configurator.
Declaration
ILogLevelDictionary Build()
Returns
Type | Description |
---|---|
ILogLevelDictionary | The ILogLevelDictionary. |
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. |
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. |
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. |