NullLogger 類別

定義

不執行任何動作的簡單記錄器。Minimalistic logger that does nothing.

public ref class NullLogger : Microsoft::Extensions::Logging::ILogger
public class NullLogger : Microsoft.Extensions.Logging.ILogger
type NullLogger = class
    interface ILogger
Public Class NullLogger
Implements ILogger
繼承
NullLogger
實作

屬性

Instance

傳回 NullLogger 的共用執行個體。Returns the shared instance of NullLogger.

方法

BeginScope<TState>(TState)

開始邏輯作業範圍。Begins a logical operation scope.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
IsEnabled(LogLevel)

檢查是否已啟用指定的 logLevelChecks if the given logLevel is enabled.

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

寫入記錄項目。Writes a log entry.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

擴充方法

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.

適用於