Class DynamicLoggerProviderBase
Inheritance
System.Object
DynamicLoggerProviderBase
Namespace: Steeltoe.Extensions.Logging
Assembly: Steeltoe.Extensions.Logging.Abstractions.dll
Syntax
public class DynamicLoggerProviderBase : object, IDynamicLoggerProvider
Constructors
| Edit this page View SourceDynamicLoggerProviderBase(Func<ILoggerProvider>, InitialLevels, IEnumerable<IDynamicMessageProcessor>)
Initializes a new instance of the DynamicLoggerProviderBase class. Contains base functionality for DynamicLoggerProvider.
Declaration
public DynamicLoggerProviderBase(Func<ILoggerProvider> getDelegateLogger, InitialLevels initialLevels, IEnumerable<IDynamicMessageProcessor> messageProcessors)
Parameters
Type | Name | Description |
---|---|---|
Func<ILoggerProvider> | getDelegateLogger | Function to a delegate Logger |
InitialLevels | initialLevels | Set the initialial filter levels |
IEnumerable<IDynamicMessageProcessor> | messageProcessors | Any IDynamicMessageProcessor Messageprocesors |
Methods
| Edit this page View SourceCreateLogger(String)
Create or retrieve an instance of an ILogger
Declaration
public ILogger CreateLogger(string categoryName)
Parameters
Type | Name | Description |
---|---|---|
System.String | categoryName | Class name that will be using the logger |
Returns
Type | Description |
---|---|
ILogger | A logger with level filtering for a given class |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
GetLoggerConfigurations()
Get a list of logger configurations
Declaration
public ICollection<ILoggerConfiguration> GetLoggerConfigurations()
Returns
Type | Description |
---|---|
ICollection<ILoggerConfiguration> | Namespaces and loggers with minimum log levels |
SetLogLevel(String, Nullable<LogLevel>)
Sets minimum log level for a given category and its decendants - resets to configured value if level is null
Declaration
public void SetLogLevel(string category, LogLevel? level)
Parameters
Type | Name | Description |
---|---|---|
System.String | category | Namespace/qualified class name |
System.Nullable<LogLevel> | level | Minimum level to log, pass null to reset |
Implements
ILoggerProvider