Interface ILogLevelConfigurator
Configure and stores the Log
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Core.dll
Syntax
public interface ILogLevelConfigurator
Methods
| Improve this doc View sourceBuild()
Builds the ILog
Declaration
ILogLevelDictionary Build()
Returns
Type | Description |
---|---|
ILog |
The ILog |
SetLogLevel(EventId, LogLevel)
Configure the log level that should be applied to the specified event.
Declaration
ILogLevelConfigurator SetLogLevel(EventId eventId, LogLevel logLevel)
Parameters
Returns
Type | Description |
---|---|
ILog |
The ILog |
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 |
---|---|---|
Event |
eventId | The event id. |
Func<Exception, Log |
logLevelFunc | The function that returns the log level. It takes the logged exception and the default log level as parameters. |
Returns
Type | Description |
---|---|
ILog |
The ILog |
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 |
---|---|---|
Event |
eventId | The event id. |
Func<Exception, Log |
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 |
---|---|
ILog |
The ILog |