Class LoggingLevelSwitch
Dynamically controls logging level.
public class LoggingLevelSwitch
- Inheritance
-
LoggingLevelSwitch
- Inherited Members
Constructors
LoggingLevelSwitch(LogEventLevel)
Create a LoggingLevelSwitch at the initial minimum level.
public LoggingLevelSwitch(LogEventLevel initialMinimumLevel = LogEventLevel.Information)
Parameters
initialMinimumLevel
LogEventLevelThe initial level to which the switch is set.
Properties
MinimumLevel
The current minimum level, below which no events should be generated.
public LogEventLevel MinimumLevel { get; set; }
Property Value
Events
MinimumLevelChanged
The event arises when MinimumLevel changed. Note that the event is raised under a lock so be careful within event handler to not fall into deadlock.
public event EventHandler<LoggingLevelSwitchChangedEventArgs>? MinimumLevelChanged