Table of Contents

Interface ILogger

Namespace
Switchboard
Assembly
Switchboard.ILogger.dll

Provides an interface for logging.

public interface ILogger
Extension Methods

Methods

Log(LogLevel, Exception, ReadOnlySpan<char>)

Logs an exception.

void Log(LogLevel logLevel, Exception exception, ReadOnlySpan<char> message)

Parameters

logLevel LogLevel

The level of significance assigned to the exception.

exception Exception

The exception to log.

message ReadOnlySpan<char>

A log message to be included with the exception.

Log(LogLevel, ReadOnlySpan<char>, string, string, int)

Logs a message.

void Log(LogLevel logLevel, ReadOnlySpan<char> message, string memberName = null, string filePath = null, int lineNumber = 0)

Parameters

logLevel LogLevel

The level of significance assigned to the message.

message ReadOnlySpan<char>

The log message.

memberName string

The name of the member that called the method. Do not provide an argument. The compiler will automatically assign the correct value.

filePath string

The name of the file that contains the member that called the method. Do not provide an argument. The compiler will automatically assign the correct value.

lineNumber int

The line number within the file that contains the member that called the method. Do not provide an argument. The compiler will automatically assign the correct value.