다음을 통해 공유


ILogger<TCategoryName> Interface

Definition

A generic interface for logging where the category name is derived from the specified TCategoryName type name. Generally used to enable activation of a named ILogger from dependency injection.

generic <typename TCategoryName>
public interface class ILogger : Microsoft::Extensions::Logging::ILogger
public interface ILogger<out TCategoryName> : Microsoft.Extensions.Logging.ILogger
type ILogger<'CategoryName> = interface
    interface ILogger
Public Interface ILogger(Of Out TCategoryName)
Implements ILogger

Type Parameters

TCategoryName

The type whose name is used for the logger category name.

This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
Derived
Implements

Methods

BeginScope<TState>(TState)

Begins a logical operation scope.

(Inherited from ILogger)
IsEnabled(LogLevel)

Checks if the given logLevel is enabled.

(Inherited from ILogger)
Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>)

Writes a log entry.

(Inherited from ILogger)

Extension Methods

BeginScope(ILogger, String, Object[])

Formats the message and creates a scope.

Log(ILogger, LogLevel, EventId, Exception, String, Object[])

Formats and writes a log message at the specified log level.

Log(ILogger, LogLevel, EventId, String, Object[])

Formats and writes a log message at the specified log level.

Log(ILogger, LogLevel, Exception, String, Object[])

Formats and writes a log message at the specified log level.

Log(ILogger, LogLevel, String, Object[])

Formats and writes a log message at the specified log level.

LogCritical(ILogger, EventId, Exception, String, Object[])

Formats and writes a critical log message.

LogCritical(ILogger, EventId, String, Object[])

Formats and writes a critical log message.

LogCritical(ILogger, Exception, String, Object[])

Formats and writes a critical log message.

LogCritical(ILogger, String, Object[])

Formats and writes a critical log message.

LogDebug(ILogger, EventId, Exception, String, Object[])

Formats and writes a debug log message.

LogDebug(ILogger, EventId, String, Object[])

Formats and writes a debug log message.

LogDebug(ILogger, Exception, String, Object[])

Formats and writes a debug log message.

LogDebug(ILogger, String, Object[])

Formats and writes a debug log message.

LogError(ILogger, EventId, Exception, String, Object[])

Formats and writes an error log message.

LogError(ILogger, EventId, String, Object[])

Formats and writes an error log message.

LogError(ILogger, Exception, String, Object[])

Formats and writes an error log message.

LogError(ILogger, String, Object[])

Formats and writes an error log message.

LogInformation(ILogger, EventId, Exception, String, Object[])

Formats and writes an informational log message.

LogInformation(ILogger, EventId, String, Object[])

Formats and writes an informational log message.

LogInformation(ILogger, Exception, String, Object[])

Formats and writes an informational log message.

LogInformation(ILogger, String, Object[])

Formats and writes an informational log message.

LogTrace(ILogger, EventId, Exception, String, Object[])

Formats and writes a trace log message.

LogTrace(ILogger, EventId, String, Object[])

Formats and writes a trace log message.

LogTrace(ILogger, Exception, String, Object[])

Formats and writes a trace log message.

LogTrace(ILogger, String, Object[])

Formats and writes a trace log message.

LogWarning(ILogger, EventId, Exception, String, Object[])

Formats and writes a warning log message.

LogWarning(ILogger, EventId, String, Object[])

Formats and writes a warning log message.

LogWarning(ILogger, Exception, String, Object[])

Formats and writes a warning log message.

LogWarning(ILogger, String, Object[])

Formats and writes a warning log message.

Applies to