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
LogLevelThe level of significance assigned to the exception.
exception
ExceptionThe 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
LogLevelThe level of significance assigned to the message.
message
ReadOnlySpan<char>The log message.
memberName
stringThe name of the member that called the method. Do not provide an argument. The compiler will automatically assign the correct value.
filePath
stringThe 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
intThe 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.