Class ExceptionlessSplatLogger
- Namespace
- Splat.Exceptionless
- Assembly
- Splat.Exceptionless.dll
Provides an implementation of the ILogger interface that writes log messages to Exceptionless using the specified source type and client configuration.
public sealed class ExceptionlessSplatLogger : ILogger
- Inheritance
-
ExceptionlessSplatLogger
- Implements
-
ILogger
- Extension Methods
Remarks
This logger maps Splat log levels to Exceptionless log levels and respects the current Exceptionless configuration for log filtering. The effective log level is determined from the Exceptionless client settings and is updated automatically when the configuration changes. Instances of this logger are typically created per source type to provide contextual logging.
Constructors
ExceptionlessSplatLogger(Type, ExceptionlessClient)
Initializes a new instance of the ExceptionlessSplatLogger class.
public ExceptionlessSplatLogger(Type sourceType, ExceptionlessClient exceptionlessClient)
Parameters
sourceTypeTypeThe type that this logger will represent.
exceptionlessClientExceptionlessClientThe Exceptionless client instance to use.
Properties
Level
Gets the level at which the target will emit messages.
public LogLevel Level { get; }
Property Value
- LogLevel
Methods
Write(Exception, string, LogLevel)
Writes a message to the target.
public void Write(Exception exception, string message, LogLevel logLevel)
Parameters
exceptionExceptionThe exception that occurred.
messagestringThe message to write.
logLevelLogLevelThe severity level of the log message.
Write(Exception, string, Type, LogLevel)
Writes a message to the target.
public void Write(Exception exception, string message, Type type, LogLevel logLevel)
Parameters
exceptionExceptionThe exception that occurred.
messagestringThe message to write.
typeTypeThe type associated with the log message.
logLevelLogLevelThe severity level of the log message.
Write(string, LogLevel)
Writes a message to the target.
public void Write(string message, LogLevel logLevel)
Parameters
messagestringThe message to write.
logLevelLogLevelThe severity level of the log message.
Write(string, Type, LogLevel)
Writes a message to the target.
public void Write(string message, Type type, LogLevel logLevel)