Class MessageLogger
- Namespace
- DuetControlServer.Utility
- Assembly
- DuetControlServer.dll
Logger that outputs messages to the object model
public sealed class MessageLogger : ILogger
- Inheritance
-
MessageLogger
- Implements
- Inherited Members
Constructors
MessageLogger(string, ObjectModel, LogLevel)
Constructor
public MessageLogger(string categoryName, ObjectModel model, LogLevel minimumLevel)
Parameters
categoryNamestringmodelObjectModelminimumLevelLogLevel
Methods
BeginScope<TState>(TState)
Begin a scope
public IDisposable? BeginScope<TState>(TState state) where TState : notnull
Parameters
stateTState
Returns
Type Parameters
TState
IsEnabled(LogLevel)
Check if log level is enabled
public bool IsEnabled(LogLevel logLevel)
Parameters
logLevelLogLevel
Returns
Log<TState>(LogLevel, EventId, TState, Exception?, Func<TState, Exception?, string>)
Log a message
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Parameters
logLevelLogLeveleventIdEventIdstateTStateexceptionExceptionformatterFunc<TState, Exception, string>
Type Parameters
TState