Class SerilogMessageProcessingLogger
- Namespace
- Steeltoe.Logging.DynamicSerilog
- Assembly
- Steeltoe.Logging.DynamicSerilog.dll
public sealed class SerilogMessageProcessingLogger : MessageProcessingLogger, ILogger
- Inheritance
-
SerilogMessageProcessingLogger
- Implements
- Inherited Members
Constructors
SerilogMessageProcessingLogger(ILogger, LoggerFilter, IEnumerable<IDynamicMessageProcessor>)
public SerilogMessageProcessingLogger(ILogger innerLogger, LoggerFilter filter, IEnumerable<IDynamicMessageProcessor> messageProcessors)
Parameters
innerLogger
ILoggerfilter
LoggerFiltermessageProcessors
IEnumerable<IDynamicMessageProcessor>
Methods
Log<TState>(LogLevel, EventId, TState, Exception?, Func<TState, Exception?, string>)
Writes a log entry.
public override void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Parameters
logLevel
LogLevelEntry will be written on this level.
eventId
EventIdId of the event.
state
TStateThe entry to be written. Can be also an object.
exception
ExceptionThe exception related to this entry.
formatter
Func<TState, Exception, string>Function to create a string message of the
state
andexception
.
Type Parameters
TState
The type of the object to be written.