Class DynamicLoggerProvider
Provides access to categories and their minimum log levels and enables to decorate log messages.
Inheritance
System.Object
DynamicLoggerProvider
Implements
ILoggerProvider
Assembly: Steeltoe.Logging.Abstractions.dll
Syntax
public abstract class DynamicLoggerProvider : object, IDynamicLoggerProvider
Constructors
|
Edit this page
View Source
DynamicLoggerProvider(ILoggerProvider, LogLevelsConfiguration, IEnumerable<IDynamicMessageProcessor>)
Declaration
protected DynamicLoggerProvider(ILoggerProvider innerLoggerProvider, LogLevelsConfiguration logLevelsConfiguration, IEnumerable<IDynamicMessageProcessor> messageProcessors)
Parameters
Type |
Name |
Description |
ILoggerProvider |
innerLoggerProvider |
The to wrap. Used to create new instances.
|
LogLevelsConfiguration |
logLevelsConfiguration |
The minimum log levels per logger category, originating from configuration.
|
IEnumerable<IDynamicMessageProcessor> |
messageProcessors |
The processors to decorate log messages with.
|
Properties
|
Edit this page
View Source
InnerLoggerProvider
Declaration
protected ILoggerProvider InnerLoggerProvider { get; }
Property Value
Type |
Description |
ILoggerProvider |
|
|
Edit this page
View Source
MessageProcessors
Declaration
protected IReadOnlyCollection<IDynamicMessageProcessor> MessageProcessors { get; }
Property Value
Methods
|
Edit this page
View Source
CreateLogger(String)
Declaration
public ILogger CreateLogger(string categoryName)
Parameters
Type |
Name |
Description |
System.String |
categoryName |
|
Returns
|
Edit this page
View Source
CreateMessageProcessingLogger(String)
Declaration
protected virtual MessageProcessingLogger CreateMessageProcessingLogger(string categoryName)
Parameters
Type |
Name |
Description |
System.String |
categoryName |
|
Returns
|
Edit this page
View Source
Dispose()
Declaration
|
Edit this page
View Source
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
|
Edit this page
View Source
GetFilter(String)
Declaration
protected LoggerFilter GetFilter(string categoryName)
Parameters
Type |
Name |
Description |
System.String |
categoryName |
|
Returns
|
Edit this page
View Source
GetLogLevels()
Gets the list of logger categories in use, with their minimum log levels.
Declaration
public ICollection<DynamicLoggerState> GetLogLevels()
Returns
|
Edit this page
View Source
RefreshConfiguration(LogLevelsConfiguration)
Refreshes the internally-tracked minimum log levels per logger category, originating from configuration.
Declaration
public void RefreshConfiguration(LogLevelsConfiguration configuration)
Parameters
Type |
Name |
Description |
LogLevelsConfiguration |
configuration |
The updated minimum log levels per logger category.
|
|
Edit this page
View Source
SetLogLevel(String, Nullable<LogLevel>)
Changes the minimum log level for the specified logger category and its descendants.
Declaration
public void SetLogLevel(string categoryName, LogLevel? minLevel)
Parameters
Type |
Name |
Description |
System.String |
categoryName |
The logger category name, which is typically a namespace or fully-qualified type name. An empty string represents the default minimum log level.
|
System.Nullable<LogLevel> |
minLevel |
The minimum log level to activate, or null to reset the level.
|
Implements
ILoggerProvider