Skip to content
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

Merged
merged 4 commits into from
Nov 10, 2020
Merged

Docs for logging, events, and diagnostics #2787

merged 4 commits into from
Nov 10, 2020

Conversation

ajcvickers
Copy link
Member

@ajcvickers ajcvickers commented Oct 17, 2020

No TOC yet since we need to decide what to do with Fundamentals. smitpatel I do not intend to merge this way.

@ajcvickers ajcvickers force-pushed the FallOnME1008 branch 3 times, most recently from 4b194ad to 777e0c0 Compare October 17, 2020 19:08
@ajcvickers ajcvickers requested a review from a team October 17, 2020 19:12
@smitpatel
Copy link
Member

Can you remove my mention in the commit message? Github is showering me with notifications. 😢

Copy link
Member

@roji roji left a 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>
Copy link
Member

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.

Copy link
Member Author

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.

entity-framework/core/miscellaneous/events/diagnostics.md Outdated Show resolved Hide resolved
entity-framework/core/miscellaneous/events/interception.md Outdated Show resolved Hide resolved
entity-framework/core/miscellaneous/events/interception.md Outdated Show resolved Hide resolved
entity-framework/core/miscellaneous/events/interception.md Outdated Show resolved Hide resolved
-->
[!code-csharp[AuditContext](../../../../samples/core/Miscellaneous/SaveChangesInterception/AuditContext.cs?name=AuditContext)]

#### The interceptor
Copy link
Member

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

Copy link
Member Author

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/interception.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
@ajcvickers
Copy link
Member Author

@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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment