共用方式為


ILogger.IsEnabled(LogLevel) 方法

定義

檢查是否已啟用指定的 logLevel

public:
 bool IsEnabled(Microsoft::Extensions::Logging::LogLevel logLevel);
public bool IsEnabled (Microsoft.Extensions.Logging.LogLevel logLevel);
abstract member IsEnabled : Microsoft.Extensions.Logging.LogLevel -> bool
Public Function IsEnabled (logLevel As LogLevel) As Boolean

參數

logLevel
LogLevel

要檢查的層級。

傳回

如果已啟用,則為 true否則為 false

適用於