Table of Contents

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

sourceType Type

The type that this logger will represent.

exceptionlessClient ExceptionlessClient

The 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

exception Exception

The exception that occurred.

message string

The message to write.

logLevel LogLevel

The 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

exception Exception

The exception that occurred.

message string

The message to write.

type Type

The type associated with the log message.

logLevel LogLevel

The severity level of the log message.

Write(string, LogLevel)

Writes a message to the target.

public void Write(string message, LogLevel logLevel)

Parameters

message string

The message to write.

logLevel LogLevel

The 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)

Parameters

message string

The message to write.

type Type

The type associated with the log message.

logLevel LogLevel

The severity level of the log message.