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
logLevelLogLevelThe level of significance assigned to the exception.
exceptionExceptionThe exception to log.
messageReadOnlySpan<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
logLevelLogLevelThe level of significance assigned to the message.
messageReadOnlySpan<char>The log message.
memberNamestringThe name of the member that called the method. Do not provide an argument. The compiler will automatically assign the correct value.
filePathstringThe 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.
lineNumberintThe 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.