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
loggerILoggerThe sub-logger. This will not be shut down automatically when the parent logger is disposed.
restrictedToMinimumLevelLogEventLevelThe 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
configureLoggerAction<LoggerConfiguration>An action that configures the sub-logger.
restrictedToMinimumLevelLogEventLevelThe minimum level for events passed through the sink. Ignored when
levelSwitchis specified.levelSwitchLoggingLevelSwitchA 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
logEventSinkILogEventSinkThe sink.
restrictedToMinimumLevelLogEventLevelThe minimum level for events passed through the sink. Ignored when
levelSwitchis specified.levelSwitchLoggingLevelSwitchA 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
restrictedToMinimumLevelLogEventLevelThe minimum level for events passed through the sink. Ignored when
levelSwitchis specified.levelSwitchLoggingLevelSwitchA switch allowing the pass-through minimum level to be changed at runtime.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Type Parameters
TSinkThe sink.