Class StructuredMessageProcessingLogger
- Namespace
- Steeltoe.Extensions.Logging
- Assembly
- Steeltoe.Extensions.Logging.Abstractions.dll
public class StructuredMessageProcessingLogger : MessageProcessingLogger, ILogger
- Inheritance
-
StructuredMessageProcessingLogger
- Implements
- Inherited Members
Constructors
StructuredMessageProcessingLogger(ILogger, IEnumerable<IDynamicMessageProcessor>)
public StructuredMessageProcessingLogger(ILogger iLogger, IEnumerable<IDynamicMessageProcessor> messageProcessors = null)
Parameters
iLoggerILoggermessageProcessorsIEnumerable<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
logLevelLogLevelEntry will be written on this level.
eventIdEventIdId of the event.
stateTStateThe entry to be written. Can be also an object.
exceptionExceptionThe exception related to this entry.
formatterFunc<TState, Exception, string>Function to create a string message of the
stateandexception.
Type Parameters
TStateThe type of the object to be written.