LoggerManager class
Manages a collection of named Serilog loggers and their configurations.
public static class LoggerManager
Public Members
| name | description |
|---|---|
| static DefaultLogger { get; set; } | Access the Serilog default logger. |
| static DefaultLoggerName { get; set; } | The name of the logger currently set as the Serilog default. |
| static Clear() | Remove and dispose all registered loggers. |
| static CloseAndFlush(…) | CloseAndFlush a logger by name. (2 methods) |
| static Contains(…) | Check if a logger, configuration, or name exists. (3 methods) |
| static Get(…) | Get a logger by name, or null if not found. |
| static GetDefault() | Returns the current Serilog default logger (Log.Logger). |
| static GetLevelSwitch(…) | Get the current minimum level for a named logger’s switch. |
| static GetName(…) | Get the name of a registered logger instance. |
| static List() | List all registered logger names. |
| static ListLevels() | List all switches and their current levels. |
| static ListLoggers() | List all registered logger instances. |
| static New(…) | Create a new LoggerConfiguration associated with a name. |
| static Register(…) | Register an existing Serilog logger instance under a name. |
| static SetLevelSwitch(…) | Set the minimum level for a named logger’s switch. |
| static TryGetName(…) | Try to get the name of a registered logger instance. |
See Also
- namespace Kestrun.Logging