-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs for logging, events, and diagnostics #2787
Conversation
4b194ad
to
777e0c0
Compare
Can you remove my mention in the commit message? Github is showering me with notifications. 😢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is much awesomeness here 🚀
Resolving EF Core events is a two-step process. First, an [observer](/dotnet/standard/events/observer-design-pattern) for `DiagnosticListener` itself must be created: | ||
|
||
<!-- | ||
public class DiagnosticObserver : IObserver<DiagnosticListener> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to show the simplified/minimal sample as in the DiagnosticSource docs, without a special Observer type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I fully understand why things are designed this way, but that "simplied" example does not look simpler to me.
--> | ||
[!code-csharp[AuditContext](../../../../samples/core/Miscellaneous/SaveChangesInterception/AuditContext.cs?name=AuditContext)] | ||
|
||
#### The interceptor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving this up before the actual code sample of the interceptor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand which part you want moving to where...
entity-framework/core/miscellaneous/events/extensions-logging.md
Outdated
Show resolved
Hide resolved
**No TOC yet since we need to decide what to do with `Fundamentals`. @smitpatel I do not intend to merge this way.** * Fixes #2615: Add information on controlling suppressing warnings and otherwise configuring EventIds * Fixes #2557: Support logging on DB level #2557 * Fixes #2770: Add entry in TOC for logging/interceptors * Fixes #583: Document how to use DiagnosticSource/DiagnosticListener * Fixes #673: Document EnableSensitiveDataLogging * Fixes #1913: Interception of database operations: InterceptionResult or InterceptionResult<DbDataReader>? * Fixes #1543: Document database interceptors with examples * Fixes #955: Document EnableRichDataErrorHandling * Fixes #661: EF Core 2.1: document state change events
777e0c0
to
524bdc5
Compare
b8a8af3
to
bab3fb7
Compare
@dotnet/efteam I believe this is now ready to merge--I will do so today. (I will make any uncontroversial minor updates from reviews. Any other suggested changes will be tracked by a new issue so I can get this merged.) |
No TOC yet since we need to decide what to do with
Fundamentals
. smitpatel I do not intend to merge this way.