Class StandardLogFormatter
- Namespace
- Switchboard
- Assembly
- Switchboard.Logger.dll
Provides a standard implementation of the ILogFormatter interface.
public sealed class StandardLogFormatter : ILogFormatter
- Inheritance
-
StandardLogFormatter
- Implements
Properties
Default
Gets a static instance of the class.
public static StandardLogFormatter Default { get; }
Methods
Format(LogLevel, Exception, ReadOnlySpan<char>, StringMakerHandle)
Formats an exception, and optional message,
by appending the formatted output to the result.
public void Format(LogLevel logLevel, Exception exception, ReadOnlySpan<char> message, StringMakerHandle result)
Parameters
logLevelLogLevelThe level of significance of the
exception.exceptionExceptionThe exception to be formatted.
messageReadOnlySpan<char>The optional message to be formatted.
resultStringMakerHandleThe formatted result is appended here.
Format(LogLevel, ReadOnlySpan<char>, StringMakerHandle)
Formats a message by appending the formatted output to the result.
public void Format(LogLevel logLevel, ReadOnlySpan<char> message, StringMakerHandle result)
Parameters
logLevelLogLevelThe level of significance of the
message.messageReadOnlySpan<char>The message to be formatted.
resultStringMakerHandleThe 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.
public void Format(LogLevel logLevel, ReadOnlySpan<char> message, string memberName, string filePath, int lineNumber, StringMakerHandle result)
Parameters
logLevelLogLevelThe level of significance of the
message.messageReadOnlySpan<char>The message to be formatted.
memberNamestringThe name of the method or member that logged the
message.filePathstringThe name of the file that logged the
message.lineNumberintThe line number that logged the
message.resultStringMakerHandleThe formatted result is appended here.