RelationalLoggerExtensions 类

定义

此类包含 EF Core 内部和关系数据库提供程序用于将信息 ILogger 写入 的 静态方法,以及 DiagnosticListener 用于已知事件的 。

此类型通常由数据库提供程序 (和其他扩展) 使用。 它通常不在应用程序代码中使用。

public static class RelationalLoggerExtensions
type RelationalLoggerExtensions = class
Public Module RelationalLoggerExtensions
继承
RelationalLoggerExtensions

注解

有关详细信息 和示例,请参阅数据库提供程序和扩展的实现

方法

AllIndexPropertiesNotToMappedToAnyTable(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IEntityType, IIndex)

AllIndexPropertiesNotToMappedToAnyTable记录事件。

AmbientTransactionEnlisted(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, Transaction)

AmbientTransactionEnlisted事件的日志。

AmbientTransactionWarning(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DateTimeOffset)

AmbientTransactionWarning事件的日志。

BatchExecutorFailedToReleaseSavepoint(IDiagnosticsLogger<DbLoggerCategory.Update>, Type, Exception)

BatchExecutorFailedToReleaseSavepoint事件的日志。

BatchExecutorFailedToRollbackToSavepoint(IDiagnosticsLogger<DbLoggerCategory.Update>, Type, Exception)

BatchExecutorFailedToRollbackToSavepoint事件的日志。

BatchReadyForExecution(IDiagnosticsLogger<DbLoggerCategory.Update>, IEnumerable<IUpdateEntry>, Int32)

BatchReadyForExecution事件的日志。

BatchSmallerThanMinBatchSize(IDiagnosticsLogger<DbLoggerCategory.Update>, IEnumerable<IUpdateEntry>, Int32, Int32)

BatchSmallerThanMinBatchSize事件的日志。

BoolWithDefaultWarning(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IProperty)

BoolWithDefaultWarning事件的日志。

ColumnOrderIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Migrations>, ColumnOperation)

这是一个支持 Entity Framework Core 基础结构的内部 API,不受与公共 API 相同的兼容性标准的约束。 可能会在任何版本中更改或删除它,而无需通知。 仅应在代码中非常谨慎地直接使用它,并且知道在更新到新的 Entity Framework Core 版本时这样做可能会导致应用程序失败。

CommandCreated(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbCommandMethod, DbContext, Guid, Guid, DateTimeOffset, TimeSpan)

CommandCreated事件的日志。

CommandCreating(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommandMethod, DbContext, Guid, Guid, DateTimeOffset)

CommandCreating事件的日志。

CommandError(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, Exception, DateTimeOffset, TimeSpan)

CommandError事件的日志。

CommandErrorAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, Exception, DateTimeOffset, TimeSpan, CancellationToken)

CommandError事件的日志。

CommandNonQueryExecuted(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, Int32, DateTimeOffset, TimeSpan)

CommandExecuted事件的日志。

CommandNonQueryExecutedAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, Int32, DateTimeOffset, TimeSpan, CancellationToken)

CommandExecuted事件的日志。

CommandNonQueryExecuting(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset)

CommandExecuting事件的日志。

CommandNonQueryExecutingAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset, CancellationToken)

CommandExecuting事件的日志。

CommandReaderExecuted(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, DbDataReader, DateTimeOffset, TimeSpan)

CommandExecuted事件的日志。

CommandReaderExecutedAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, DbDataReader, DateTimeOffset, TimeSpan, CancellationToken)

CommandExecuted事件的日志。

CommandReaderExecuting(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset)

CommandExecuting事件的日志。

CommandReaderExecutingAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset, CancellationToken)

CommandExecuting事件的日志。

CommandScalarExecuted(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, Object, DateTimeOffset, TimeSpan)

CommandExecuted事件的日志。

CommandScalarExecutedAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, Object, DateTimeOffset, TimeSpan, CancellationToken)

CommandExecuted事件的日志。

CommandScalarExecuting(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset)

CommandExecuting事件的日志。

CommandScalarExecutingAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset, CancellationToken)

CommandExecuting事件的日志。

ConnectionClosed(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, DateTimeOffset, TimeSpan)

ConnectionClosed事件的日志。

ConnectionClosedAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, DateTimeOffset, TimeSpan)

ConnectionClosed事件的日志。

ConnectionClosing(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, DateTimeOffset)

ConnectionClosing事件的日志。

ConnectionClosingAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, DateTimeOffset)

ConnectionClosing事件的日志。

ConnectionError(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, Exception, DateTimeOffset, TimeSpan, Boolean)

ConnectionError事件的日志。

ConnectionErrorAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, Exception, DateTimeOffset, TimeSpan, Boolean, CancellationToken)

ConnectionError事件的日志。

ConnectionOpened(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, DateTimeOffset, TimeSpan)

ConnectionOpened事件的日志。

ConnectionOpenedAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, DateTimeOffset, TimeSpan, CancellationToken)

ConnectionOpened事件的日志。

ConnectionOpening(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, DateTimeOffset)

ConnectionOpening事件的日志。

ConnectionOpeningAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>, IRelationalConnection, DateTimeOffset, CancellationToken)

ConnectionOpening事件的日志。

CreatedTransactionSavepoint(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

CreatedTransactionSavepoint事件的日志。

CreatedTransactionSavepointAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

CreatedTransactionSavepoint事件的日志。

CreatingTransactionSavepoint(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

CreatingTransactionSavepoint事件的日志。

CreatingTransactionSavepointAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

CreatingTransactionSavepoint事件的日志。

DataReaderDisposing(IDiagnosticsLogger<DbLoggerCategory.Database.Command>, IRelationalConnection, DbCommand, DbDataReader, Guid, Int32, Int32, DateTimeOffset, TimeSpan)

DataReaderDisposing事件的日志。

DuplicateColumnOrders(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, StoreObjectIdentifier, IReadOnlyList<String>)

DuplicateColumnOrders记录事件。

ExecuteDeleteFailed(IDiagnosticsLogger<DbLoggerCategory.Query>, Type, Exception)

ExecuteDeleteFailed事件的日志。

ExecuteUpdateFailed(IDiagnosticsLogger<DbLoggerCategory.Query>, Type, Exception)

ExecuteUpdateFailed事件的日志。

ExplicitTransactionEnlisted(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, Transaction)

ExplicitTransactionEnlisted事件的日志。

ForeignKeyPropertiesMappedToUnrelatedTables(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IForeignKey)

ForeignKeyPropertiesMappedToUnrelatedTables记录事件。

ForeignKeyTpcPrincipalWarning(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IForeignKey)

ForeignKeyTpcPrincipalWarning记录事件。

IndexPropertiesBothMappedAndNotMappedToTable(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IEntityType, IIndex, String)

IndexPropertiesBothMappedAndNotMappedToTable记录事件。

IndexPropertiesMappedToNonOverlappingTables(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IEntityType, IIndex, String, List<ValueTuple<String,String>>, String, List<ValueTuple<String,String>>)

IndexPropertiesMappedToNonOverlappingTables记录事件。

KeyPropertiesNotMappedToTable(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IKey)

KeyPropertiesNotMappedToTable记录事件。

MigrateUsingConnection(IDiagnosticsLogger<DbLoggerCategory.Migrations>, IMigrator, IRelationalConnection)

MigrateUsingConnection事件的日志。

MigrationApplying(IDiagnosticsLogger<DbLoggerCategory.Migrations>, IMigrator, Migration)

MigrationApplying事件的日志。

MigrationAttributeMissingWarning(IDiagnosticsLogger<DbLoggerCategory.Migrations>, TypeInfo)

MigrationAttributeMissingWarning事件的日志。

MigrationGeneratingDownScript(IDiagnosticsLogger<DbLoggerCategory.Migrations>, IMigrator, Migration, String, String, Boolean)

MigrationGeneratingDownScript事件的日志。

MigrationGeneratingUpScript(IDiagnosticsLogger<DbLoggerCategory.Migrations>, IMigrator, Migration, String, String, Boolean)

MigrationGeneratingUpScript事件的日志。

MigrationReverting(IDiagnosticsLogger<DbLoggerCategory.Migrations>, IMigrator, Migration)

MigrationReverting事件的日志。

MigrationsNotApplied(IDiagnosticsLogger<DbLoggerCategory.Migrations>, IMigrator)

MigrationsNotApplied事件的日志。

MigrationsNotFound(IDiagnosticsLogger<DbLoggerCategory.Migrations>, IMigrator, IMigrationsAssembly)

MigrationsNotFound事件的日志。

ModelValidationKeyDefaultValueWarning(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IProperty)

ModelValidationKeyDefaultValueWarning事件的日志。

MultipleCollectionIncludeWarning(IDiagnosticsLogger<DbLoggerCategory.Query>)

MultipleCollectionIncludeWarning事件的日志。

NonQueryOperationFailed(IDiagnosticsLogger<DbLoggerCategory.Query>, Type, Exception)

NonQueryOperationFailed事件的日志。

OptionalDependentWithAllNullPropertiesWarning(IDiagnosticsLogger<DbLoggerCategory.Update>, IUpdateEntry)

OptionalDependentWithAllNullPropertiesWarning记录事件。

OptionalDependentWithAllNullPropertiesWarningSensitive(IDiagnosticsLogger<DbLoggerCategory.Update>, IUpdateEntry)

OptionalDependentWithAllNullPropertiesWarning记录事件。

OptionalDependentWithoutIdentifyingPropertyWarning(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IEntityType)

OptionalDependentWithoutIdentifyingPropertyWarning记录事件。

QueryPossibleExceptionWithAggregateOperatorWarning(IDiagnosticsLogger<DbLoggerCategory.Query>)
已过时。.

QueryPossibleExceptionWithAggregateOperatorWarning事件的日志。

QueryPossibleUnintendedUseOfEqualsWarning(IDiagnosticsLogger<DbLoggerCategory.Query>, MethodCallExpression)

QueryPossibleUnintendedUseOfEqualsWarning事件的日志。

QueryPossibleUnintendedUseOfEqualsWarning(IDiagnosticsLogger<DbLoggerCategory.Query>, SqlExpression, SqlExpression)

QueryPossibleUnintendedUseOfEqualsWarning事件的日志。

ReleasedTransactionSavepoint(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

ReleasedTransactionSavepoint事件的日志。

ReleasedTransactionSavepointAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

ReleasedTransactionSavepoint事件的日志。

ReleasingTransactionSavepoint(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

RollingBackToTransactionSavepoint事件的日志。

ReleasingTransactionSavepointAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

ReleasingTransactionSavepoint事件的日志。

RolledBackToTransactionSavepoint(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

RolledBackToTransactionSavepoint事件的日志。

RolledBackToTransactionSavepointAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

CreatedTransactionSavepoint事件的日志。

RollingBackToTransactionSavepoint(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

RollingBackToTransactionSavepoint事件的日志。

RollingBackToTransactionSavepointAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

RollingBackToTransactionSavepoint事件的日志。

StoredProcedureConcurrencyTokenNotMapped(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IEntityType, IProperty, String)

StoredProcedureConcurrencyTokenNotMapped记录事件。

TpcStoreGeneratedIdentityWarning(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IProperty)

TpcStoreGeneratedIdentityWarning记录事件。

TransactionCommitted(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, TimeSpan)

TransactionCommitted事件的日志。

TransactionCommittedAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, TimeSpan, CancellationToken)

TransactionCommitted事件的日志。

TransactionCommitting(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

TransactionCommitting事件的日志。

TransactionCommittingAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

TransactionCommitting事件的日志。

TransactionDisposed(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

TransactionDisposed事件的日志。

TransactionError(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, String, Exception, DateTimeOffset, TimeSpan)

TransactionError事件的日志。

TransactionErrorAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, String, Exception, DateTimeOffset, TimeSpan, CancellationToken)

TransactionError事件的日志。

TransactionRolledBack(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, TimeSpan)

TransactionRolledBack事件的日志。

TransactionRolledBackAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, TimeSpan, CancellationToken)

TransactionRolledBack事件的日志。

TransactionRollingBack(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

TransactionRollingBack事件的日志。

TransactionRollingBackAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

TransactionRollingBack事件的日志。

TransactionStarted(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, TimeSpan)

TransactionStarted事件的日志。

TransactionStartedAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, TimeSpan, CancellationToken)

TransactionStarted事件的日志。

TransactionStarting(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, IsolationLevel, Guid, DateTimeOffset)

TransactionStarting事件的日志。

TransactionStartingAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, IsolationLevel, Guid, DateTimeOffset, CancellationToken)

TransactionStarting事件的日志。

TransactionUsed(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset)

TransactionUsed事件的日志。

TransactionUsedAsync(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, IRelationalConnection, DbTransaction, Guid, DateTimeOffset, CancellationToken)

TransactionUsed事件的日志。

TriggerOnNonRootTphEntity(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IEntityType)

TransactionError事件的日志。

UnexpectedTrailingResultSetWhenSaving(IDiagnosticsLogger<DbLoggerCategory.Update>)

UnexpectedTrailingResultSetWhenSaving事件的日志。

适用于