Class LoggerMinimumLevelConfiguration
- Namespace
- Serilog.Configuration
- Assembly
- Serilog.dll
Controls sink configuration.
public class LoggerMinimumLevelConfiguration
- Inheritance
-
LoggerMinimumLevelConfiguration
- Inherited Members
Methods
ControlledBy(LoggingLevelSwitch)
Sets the minimum level to be dynamically controlled by the provided switch.
public LoggerConfiguration ControlledBy(LoggingLevelSwitch levelSwitch)
Parameters
levelSwitchLoggingLevelSwitchThe switch.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Exceptions
- ArgumentNullException
When
levelSwitchisnull
Debug()
Internal system events that aren't necessarily observable from the outside.
public LoggerConfiguration Debug()
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Error()
Functionality is unavailable, invariants are broken or data is lost.
public LoggerConfiguration Error()
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Fatal()
If you have a pager, it goes off when one of these occurs.
public LoggerConfiguration Fatal()
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Information()
The lifeblood of operational intelligence - things happen.
public LoggerConfiguration Information()
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Is(LogEventLevel)
Sets the minimum level at which events will be passed to sinks.
public LoggerConfiguration Is(LogEventLevel minimumLevel)
Parameters
minimumLevelLogEventLevelThe minimum level to set.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Override(string, LoggingLevelSwitch)
Override the minimum level for events from a specific namespace or type name. This API is not supported for configuring sub-loggers (created through Logger(ILogger, LogEventLevel)). Use Filter or Conditional(Func<LogEvent, bool>, Action<LoggerSinkConfiguration>) instead. You also might consider using https://github.com/serilog/serilog-filters-expressions.
public LoggerConfiguration Override(string source, LoggingLevelSwitch levelSwitch)
Parameters
sourcestringThe (partial) namespace or type name to set the override for.
levelSwitchLoggingLevelSwitchThe switch controlling loggers for matching sources.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Exceptions
- ArgumentNullException
When
sourceisnull- ArgumentException
When a trimmed
sourceis empty- ArgumentNullException
When
levelSwitchisnull
Override(string, LogEventLevel)
Override the minimum level for events from a specific namespace or type name. This API is not supported for configuring sub-loggers (created through Logger(ILogger, LogEventLevel)). Use Filter or Conditional(Func<LogEvent, bool>, Action<LoggerSinkConfiguration>) instead. You also might consider using https://github.com/serilog/serilog-filters-expressions.
public LoggerConfiguration Override(string source, LogEventLevel minimumLevel)
Parameters
sourcestringThe (partial) namespace or type name to set the override for.
minimumLevelLogEventLevelThe minimum level applied to loggers for matching sources.
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Exceptions
- ArgumentNullException
When
sourceisnull
Verbose()
Anything and everything you might want to know about a running block of code.
public LoggerConfiguration Verbose()
Returns
- LoggerConfiguration
Configuration object allowing method chaining.
Warning()
Service is degraded or endangered.
public LoggerConfiguration Warning()
Returns
- LoggerConfiguration
Configuration object allowing method chaining.