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
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.
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.
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.