Table of Contents

Interface ILogFormatter

Namespace
Switchboard
Assembly
Switchboard.Logger.dll

Provides an interface for formatting log message and exceptions.

public interface ILogFormatter

Methods

Format(LogLevel, Exception, ReadOnlySpan<char>, StringMakerHandle)

Formats an exception, and optional message, by appending the formatted output to the result.

void Format(LogLevel logLevel, Exception exception, ReadOnlySpan<char> message, StringMakerHandle result)

Parameters

logLevel LogLevel

The level of significance of the exception.

exception Exception

The exception to be formatted.

message ReadOnlySpan<char>

The optional message to be formatted.

result StringMakerHandle

The formatted result is appended here.

Format(LogLevel, ReadOnlySpan<char>, StringMakerHandle)

Formats a message by appending the formatted output to the result.

void Format(LogLevel logLevel, ReadOnlySpan<char> message, StringMakerHandle result)

Parameters

logLevel LogLevel

The level of significance of the message.

message ReadOnlySpan<char>

The message to be formatted.

result StringMakerHandle

The formatted result is appended here.

Format(LogLevel, ReadOnlySpan<char>, string, string, int, StringMakerHandle)

Formats a message, including the memberName, filePath, and lineNumber that logged the message, by appending the formatted output to the result.

void Format(LogLevel logLevel, ReadOnlySpan<char> message, string memberName, string filePath, int lineNumber, StringMakerHandle result)

Parameters

logLevel LogLevel

The level of significance of the message.

message ReadOnlySpan<char>

The message to be formatted.

memberName string

The name of the method or member that logged the message.

filePath string

The name of the file that logged the message.

lineNumber int

The line number that logged the message.

result StringMakerHandle

The formatted result is appended here.