IRelationalConnectionDiagnosticsLogger 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
IDiagnosticsLogger<TLoggerCategory>還有一些額外功能,適合高效能伐木。
public interface IRelationalConnectionDiagnosticsLogger : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection>
type IRelationalConnectionDiagnosticsLogger = interface
interface IDiagnosticsLogger<DbLoggerCategory.Database.Connection>
interface IDiagnosticsLogger
Public Interface IRelationalConnectionDiagnosticsLogger
Implements IDiagnosticsLogger(Of DbLoggerCategory.Database.Connection)
- 實作
備註
服役期間為 Scoped。 這表示每個 DbContext 實例都會使用自己的服務實例。 實作方式可能取決於其他註冊於任何生命週期的服務。 實作不需要執行緒安全。
更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。
屬性
| 名稱 | Description |
|---|---|
| DbContextLogger | (繼承來源 IDiagnosticsLogger) |
| Definitions |
快取以取得日誌定義。 (繼承來源 IDiagnosticsLogger) |
| DiagnosticSource | (繼承來源 IDiagnosticsLogger<TLoggerCategory>) |
| Interceptors |
存放註冊攔截機(如果有的話)。 (繼承來源 IDiagnosticsLogger<TLoggerCategory>) |
| Logger |
底層 ILogger的 。 (繼承來源 IDiagnosticsLogger<TLoggerCategory>) |
| Options |
Entity Framework 日誌選項。 (繼承來源 IDiagnosticsLogger<TLoggerCategory>) |
方法
擴充方法
| 名稱 | Description |
|---|---|
| SensitiveDataLoggingEnabledWarning<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>) |