ILogger Interface

Definition

Represents a logger that can be used for logging messages.

public interface ILogger
type ILogger = interface
Public Interface ILogger
Derived

Methods

Name Description
IsEnabled(LogLevel)

Checks if the logger is enabled for the specified log level.

Log<TState>(LogLevel, TState, Exception, Func<TState,Exception,String>)

Logs a message with the specified log level, state, exception, and formatter.

LogAsync<TState>(LogLevel, TState, Exception, Func<TState,Exception,String>)

Asynchronously logs a message with the specified log level, state, exception, and formatter.

Extension Methods

Name Description
LogCritical(ILogger, String)

Logs a message with the critical log level.

LogCriticalAsync(ILogger, String)

Logs a message with the critical log level.

LogDebug(ILogger, String)

Logs a message with the debug log level.

LogDebugAsync(ILogger, String)

Logs a message with the debug log level.

LogError(ILogger, Exception)

Logs a message with the error log level.

LogError(ILogger, String, Exception)

Logs a message with the error log level.

LogError(ILogger, String)

Logs a message with the error log level.

LogErrorAsync(ILogger, Exception)

Logs a message with the error log level.

LogErrorAsync(ILogger, String, Exception)

Logs a message with the error log level.

LogErrorAsync(ILogger, String)

Logs a message with the error log level.

LogInformation(ILogger, String)

Logs a message with the info log level.

LogInformationAsync(ILogger, String)

Logs a message with the info log level.

LogTrace(ILogger, String)

Logs a message with the trace log level.

LogTraceAsync(ILogger, String)

Logs a message with the trace log level.

LogWarning(ILogger, String)

Logs a message with the warning log level.

LogWarningAsync(ILogger, String)

Logs a message with the warning log level.

Applies to