Partilhar via


CoreLoggerExtensions Class

Definition

This class contains static methods used by EF Core internals and database providers to write information to an ILogger and a DiagnosticListener for well-known events.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public static class CoreLoggerExtensions
type CoreLoggerExtensions = class
Public Module CoreLoggerExtensions
Inheritance
CoreLoggerExtensions

Remarks

See Implementation of database providers and extensions for more information and examples.

Methods

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

Logs for the AccidentalEntityType event.

AmbiguousEndRequiredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IForeignKey)

Logs for the AmbiguousEndRequiredWarning event.

CascadeDelete(IDiagnosticsLogger<DbLoggerCategory.Update>, InternalEntityEntry, InternalEntityEntry, EntityState)

Logs for the CascadeDelete event.

CascadeDeleteOrphan(IDiagnosticsLogger<DbLoggerCategory.Update>, InternalEntityEntry, IEntityType, EntityState)

Logs for the CascadeDeleteOrphan event.

CascadeDeleteOrphanSensitive(IDiagnosticsLogger<DbLoggerCategory.Update>, InternalEntityEntry, IEntityType, EntityState)

Logs for the CascadeDeleteOrphan event.

CascadeDeleteSensitive(IDiagnosticsLogger<DbLoggerCategory.Update>, InternalEntityEntry, InternalEntityEntry, EntityState)

Logs for the CascadeDelete event.

CollectionChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, INavigation, ISet<Object>, ISet<Object>)

Logs for the CollectionChangeDetected event.

CollectionChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, INavigation, ISet<Object>, ISet<Object>)

Logs for the CollectionChangeDetected event.

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

Logs for the CollectionWithoutComparer event.

ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, MemberInfo)

Logs for the ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning event.

ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, MemberInfo)

Logs for the ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning event.

ConflictingKeylessAndKeyAttributesWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IProperty)

Logs for the ConflictingKeylessAndKeyAttributesWarning event.

ConflictingKeylessAndKeyAttributesWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyProperty)

Logs for the ConflictingKeylessAndKeyAttributesWarning event.

ConflictingShadowForeignKeysWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IForeignKey)

Logs for the ConflictingShadowForeignKeysWarning event.

ConflictingShadowForeignKeysWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyForeignKey)

Logs for the ConflictingShadowForeignKeysWarning event.

ContextDisposed(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext)

Logs for the ContextDisposed event.

ContextInitialized(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, DbContextOptions)

Logs for the ContextInitialized event.

DetachedLazyLoadingWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, Object, String)

Logs for the DetachedLazyLoadingWarning event.

DetectChangesCompleted(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, DbContext)

Logs for the DetectChangesCompleted event.

DetectChangesStarting(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, DbContext)

Logs for the DetectChangesStarting event.

DistinctAfterOrderByWithoutRowLimitingOperatorWarning(IDiagnosticsLogger<DbLoggerCategory.Query>)

Logs for the DistinctAfterOrderByWithoutRowLimitingOperatorWarning event.

DuplicateDependentEntityTypeInstanceWarning(IDiagnosticsLogger<DbLoggerCategory.Update>, IEntityType, IEntityType)

Logs for the DuplicateDependentEntityTypeInstanceWarning event.

ExecutionStrategyRetrying(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, IReadOnlyList<Exception>, TimeSpan, Boolean)

Logs for the ExecutionStrategyRetrying event.

FirstWithoutOrderByAndFilterWarning(IDiagnosticsLogger<DbLoggerCategory.Query>)

Logs for the FirstWithoutOrderByAndFilterWarning event.

ForeignKeyAttributesOnBothNavigationsWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, INavigation)

Logs for the ForeignKeyAttributesOnBothNavigationsWarning event.

ForeignKeyAttributesOnBothNavigationsWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, IReadOnlyNavigation)

Logs for the ForeignKeyAttributesOnBothNavigationsWarning event.

ForeignKeyAttributesOnBothPropertiesWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, INavigation, MemberInfo, MemberInfo)

Logs for the ForeignKeyAttributesOnBothPropertiesWarning event.

ForeignKeyAttributesOnBothPropertiesWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, IReadOnlyNavigation, MemberInfo, MemberInfo)

Logs for the ForeignKeyAttributesOnBothPropertiesWarning event.

ForeignKeyChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Object)

Logs for the ForeignKeyChangeDetected event.

ForeignKeyChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Object)

Logs for the ForeignKeyChangeDetected event.

IncompatibleMatchingForeignKeyProperties(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyList<IPropertyBase>, IReadOnlyList<IPropertyBase>)

Logs for the IncompatibleMatchingForeignKeyProperties event.

IncompatibleMatchingForeignKeyProperties(IDiagnosticsLogger<DbLoggerCategory.Model>, String, String, IReadOnlyList<IPropertyBase>, IReadOnlyList<IPropertyBase>)

Logs for the IncompatibleMatchingForeignKeyProperties event.

IncompatibleMatchingForeignKeyProperties(IDiagnosticsLogger<DbLoggerCategory.Model>, String, String, IReadOnlyList<IReadOnlyPropertyBase>, IReadOnlyList<IReadOnlyPropertyBase>)

Logs for the IncompatibleMatchingForeignKeyProperties event.

InvalidIncludePathError(IDiagnosticsLogger<DbLoggerCategory.Query>, String, String)

Logs for the InvalidIncludePathError event.

LazyLoadOnDisposedContextWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, Object, String)

Logs for the LazyLoadOnDisposedContextWarning event.

ManyServiceProvidersCreatedWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, ICollection<IServiceProvider>)

Logs for the ManyServiceProvidersCreatedWarning event.

MappedComplexPropertyIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IComplexProperty)

Logs for the MappedComplexPropertyIgnoredWarning event.

MappedEntityTypeIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IEntityType)

Logs for the MappedEntityTypeIgnoredWarning event.

MappedNavigationIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigationBase)

Logs for the MappedNavigationIgnoredWarning event.

MappedPropertyIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IProperty)

Logs for the MappedPropertyIgnoredWarning event.

MultipleInversePropertiesSameTargetWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IEnumerable<Tuple<MemberInfo,Type>>, MemberInfo, Type)

Logs for the MultipleInversePropertiesSameTargetWarning event.

MultipleNavigationProperties(IDiagnosticsLogger<DbLoggerCategory.Model>, IEnumerable<Tuple<MemberInfo,Type>>, IEnumerable<Tuple<MemberInfo,Type>>)

Logs for the MultipleNavigationProperties event.

MultiplePrimaryKeyCandidates(IDiagnosticsLogger<DbLoggerCategory.Model>, IProperty, IProperty)

Logs for the MultiplePrimaryKeyCandidates event.

MultiplePrimaryKeyCandidates(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyProperty, IReadOnlyProperty)

Logs for the MultiplePrimaryKeyCandidates event.

NavigationBaseIncluded(IDiagnosticsLogger<DbLoggerCategory.Query>, INavigationBase)

Logs for the NavigationBaseIncluded event.

NavigationBaseIncludeIgnored(IDiagnosticsLogger<DbLoggerCategory.Query>, INavigationBase)

Logs for the NavigationBaseIncludeIgnored event.

NavigationLazyLoading(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, Object, String)

Logs for the NavigationLazyLoading event.

NoEntityTypeConfigurationsWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, Assembly)

Logs for the NoEntityTypeConfigurationsWarning event.

NonDefiningInverseNavigationWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IEntityType, MemberInfo, IEntityType, MemberInfo, MemberInfo)
Obsolete.

Logs for the NonDefiningInverseNavigationWarning event.

NonNullableInverted(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)
Obsolete.

Logs for the NonNullableInverted event.

NonNullableReferenceOnBothNavigations(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, INavigation)
Obsolete.

Logs for the NonNullableReferenceOnBothNavigations event.

NonNullableReferenceOnBothNavigations(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, IReadOnlyNavigation)
Obsolete.

Logs for the NonNullableReferenceOnBothNavigations event.

NonNullableReferenceOnDependent(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)
Obsolete.

Logs for the NonNullableReferenceOnDependent event.

NonOwnershipInverseNavigationWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IEntityType, MemberInfo, IEntityType, MemberInfo, MemberInfo)

Logs for the NonOwnershipInverseNavigationWarning event.

NonOwnershipInverseNavigationWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyEntityType, MemberInfo, IReadOnlyEntityType, MemberInfo, MemberInfo)

Logs for the NonOwnershipInverseNavigationWarning event.

OldModelVersionWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, DbContextOptions)

Logs for the OldModelVersionWarning event.

OptimisticConcurrencyException(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception)

Logs for the OptimisticConcurrencyException event.

OptimisticConcurrencyException(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException, Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>, EventDefinition<Exception>,ConcurrencyExceptionEventData>)

Logs for the OptimisticConcurrencyException event.

OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception, CancellationToken)

Logs for the OptimisticConcurrencyException event.

OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException, Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>, EventDefinition<Exception>,ConcurrencyExceptionEventData>, CancellationToken)

Logs for the OptimisticConcurrencyException event.

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

Logs for the PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning event.

PossibleUnintendedCollectionNavigationNullComparisonWarning(IDiagnosticsLogger<DbLoggerCategory.Query>, INavigation)

Logs for the PossibleUnintendedCollectionNavigationNullComparisonWarning event.

PossibleUnintendedReferenceComparisonWarning(IDiagnosticsLogger<DbLoggerCategory.Query>, Expression, Expression)

Logs for the PossibleUnintendedReferenceComparisonWarning event.

PropertyChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Object)

Logs for the PropertyChangeDetected event.

PropertyChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Object)

Logs for the PropertyChangeDetected event.

QueryCanceled(IDiagnosticsLogger<DbLoggerCategory.Query>, Type)

Logs for the QueryCanceled event.

QueryCompilationStarting(IDiagnosticsLogger<DbLoggerCategory.Query>, DbContext, ExpressionPrinter, Expression)

Logs for the QueryCompilationStarting event.

QueryCompilationStarting(IDiagnosticsLogger<DbLoggerCategory.Query>, ExpressionPrinter, Expression)

Logs for the QueryCompilationStarting event.

QueryExecutionPlanned(IDiagnosticsLogger<DbLoggerCategory.Query>, DbContext, ExpressionPrinter, Expression)

Logs for the QueryExecutionPlanned event.

QueryExecutionPlanned(IDiagnosticsLogger<DbLoggerCategory.Query>, ExpressionPrinter, Expression)

Logs for the QueryExecutionPlanned event.

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

Logs for the QueryIterationFailed event.

RedundantAddServicesCallWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, IServiceProvider)

Logs for the RedundantAddServicesCallWarning event.

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

Logs for the RedundantForeignKeyWarning event.

RedundantIndexRemoved(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyList<IPropertyBase>, IReadOnlyList<IPropertyBase>)

Logs for the RedundantIndexRemoved event.

RedundantIndexRemoved(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyList<IReadOnlyPropertyBase>, IReadOnlyList<IReadOnlyPropertyBase>)

Logs for the RedundantIndexRemoved event.

ReferenceChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, INavigation, Object, Object)

Logs for the ReferenceChangeDetected event.

ReferenceChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, INavigation, Object, Object)

Logs for the ReferenceChangeDetected event.

RequiredAttributeInverted(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)
Obsolete.

Logs for the RequiredAttributeInverted event.

RequiredAttributeOnBothNavigations(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, INavigation)
Obsolete.

Logs for the RequiredAttributeOnBothNavigations event.

RequiredAttributeOnBothNavigations(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, IReadOnlyNavigation)
Obsolete.

Logs for the RequiredAttributeOnBothNavigations event.

RequiredAttributeOnCollection(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)

Logs for the RequiredAttributeOnCollection event.

RequiredAttributeOnCollection(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation)

Logs for the RequiredAttributeOnCollection event.

RequiredAttributeOnDependent(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)
Obsolete.

Logs for the RequiredAttributeOnDependent event.

RequiredAttributeOnSkipNavigation(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlySkipNavigation)

Logs for the RequiredAttributeOnSkipNavigation event.

RequiredAttributeOnSkipNavigation(IDiagnosticsLogger<DbLoggerCategory.Model>, ISkipNavigation)

Logs for the RequiredAttributeOnSkipNavigation event.

RowLimitingOperationWithoutOrderByWarning(IDiagnosticsLogger<DbLoggerCategory.Query>)

Logs for the RowLimitingOperationWithoutOrderByWarning event.

SaveChangesCanceled(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext)

Logs for the SaveChangesFailed event.

SaveChangesCanceledAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, CancellationToken)

Logs for the SaveChangesFailed event.

SaveChangesCompleted(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Int32)

Logs for the SaveChangesCompleted event.

SaveChangesCompletedAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Int32, CancellationToken)

Logs for the SaveChangesCompleted event.

SaveChangesFailed(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception)

Logs for the SaveChangesFailed event.

SaveChangesFailedAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception, CancellationToken)

Logs for the SaveChangesFailed event.

SaveChangesStarting(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext)

Logs for the SaveChangesStarting event.

SaveChangesStartingAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, CancellationToken)

Logs for the SaveChangesStarting event.

SensitiveDataLoggingEnabledWarning<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>)

Logs for the SensitiveDataLoggingEnabledWarning event.

ServiceProviderCreated(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, IServiceProvider)

Logs for the ServiceProviderCreated event.

ServiceProviderDebugInfo(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, IDictionary<String,String>, IList<IDictionary<String,String>>)

Logs for the ServiceProviderDebugInfo event.

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

Logs for the ShadowForeignKeyPropertyCreated event.

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

Logs for the ShadowPropertyCreated event.

SkipCollectionChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, ISkipNavigation, ISet<Object>, ISet<Object>)

Logs for the CollectionChangeDetected event.

SkipCollectionChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, ISkipNavigation, ISet<Object>, ISet<Object>)

Logs for the CollectionChangeDetected event.

SkippedEntityTypeConfigurationWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, Type)

Logs for the SkippedEntityTypeConfigurationWarning event.

StartedTracking(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry)

Logs for the StartedTracking event.

StartedTrackingSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry)

Logs for the StartedTracking event.

StateChanged(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, EntityState, EntityState)

Logs for the StateChanged event.

StateChangedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, EntityState, EntityState)

Logs for the StateChanged event.

StringEnumValueInJson(IDiagnosticsLogger<DbLoggerCategory.Query>, Type)

Logs for the StringEnumValueInJson event.

TypeLoadingErrorWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, Assembly, Exception)

Logs for the TypeLoadingErrorWarning event.

ValueGenerated(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Boolean)

Logs for the ValueGenerated event.

ValueGeneratedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Boolean)

Logs for the ValueGenerated event.

Applies to