Class LoggerAuditSinkConfiguration
- Namespace
- Serilog.Configuration
- Assembly
- Serilog.dll
Controls audit sink configuration.
public class LoggerAuditSinkConfiguration
- Inheritance
-
LoggerAuditSinkConfiguration
- Inherited Members
Methods
Logger(ILogger, LogEventLevel)
Audit log events to a sub-logger, where further processing may occur. Events through the sub-logger will be constrained by filters and enriched by enrichers that are active in the parent. A sub-logger cannot be used to log at a more verbose level, but a less verbose level is possible.
public LoggerConfiguration Logger(ILogger logger, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose)
Parameters
logger
ILoggerThe sub-logger. This will not be shut down automatically when the parent logger is disposed.
restrictedToMinimumLevel
LogEventLevelThe minimum level for events passed through the sink.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Logger(Action<LoggerConfiguration>, LogEventLevel, LoggingLevelSwitch?)
Audit log events to a sub-logger, where further processing may occur. Events through the sub-logger will be constrained by filters and enriched by enrichers that are active in the parent. A sub-logger cannot be used to log at a more verbose level, but a less verbose level is possible.
public LoggerConfiguration Logger(Action<LoggerConfiguration> configureLogger, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch? levelSwitch = null)
Parameters
configureLogger
Action<LoggerConfiguration>An action that configures the sub-logger.
restrictedToMinimumLevel
LogEventLevelThe minimum level for events passed through the sink. Ignored when
levelSwitch
is specified.levelSwitch
LoggingLevelSwitchA switch allowing the pass-through minimum level to be changed at runtime.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Sink(ILogEventSink, LogEventLevel, LoggingLevelSwitch?)
Audit log events to the specified ILogEventSink.
public LoggerConfiguration Sink(ILogEventSink logEventSink, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch? levelSwitch = null)
Parameters
logEventSink
ILogEventSinkThe sink.
restrictedToMinimumLevel
LogEventLevelThe minimum level for events passed through the sink. Ignored when
levelSwitch
is specified.levelSwitch
LoggingLevelSwitchA switch allowing the pass-through minimum level to be changed at runtime.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Sink<TSink>(LogEventLevel, LoggingLevelSwitch?)
Audit log events to the specified ILogEventSink.
public LoggerConfiguration Sink<TSink>(LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch? levelSwitch = null) where TSink : ILogEventSink, new()
Parameters
restrictedToMinimumLevel
LogEventLevelThe minimum level for events passed through the sink. Ignored when
levelSwitch
is specified.levelSwitch
LoggingLevelSwitchA switch allowing the pass-through minimum level to be changed at runtime.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Type Parameters
TSink
The sink.