Interface ILogLevelConfigurator
Configure and stores the Microsoft.Extensions.Logging.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 |
---|---|---|
Microsoft.Extensions.Logging.EventId | eventId | The event id. |
Microsoft.Extensions.Logging.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 |
---|---|---|
Microsoft.Extensions.Logging.EventId | eventId | The event id. |
System.Func<System.Exception, Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.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 |
---|---|---|
Microsoft.Extensions.Logging.EventId | eventId | The event id. |
System.Func<System.Exception, Microsoft.Extensions.Logging.LogLevel, System.Lazy<System.String>, Microsoft.Extensions.Logging.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. |