-
-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
bugIssues describing a bug or pull requests fixing a bug.Issues describing a bug or pull requests fixing a bug.
Description
Describe the bug
When using the appsettings.json configuration
"Enrich": [
"WithExceptionDetails"
],
for serilog, I get messages that the Max Destructuring Deepth has been reached and all my DbContext objects are logged. I see there is a fix for this by using the fluent api to specify the Enrichment with custom destructurer. Is there a way to use the config file to do the same configuration?
Reference bug where this fix was implemented: Entity Framework Logging Behaviour #439 . Note that when I have the code in my program.cs to initialize the log, it is overridden by the appsettings.json and the issues of logging the whole DbContext still occurs.
Steps to reproduce
- Set up serilog logging
- Set up Destructure Enrichment with .Net 8 libraries
- Set up appsettings.json with Serilog Enrich section using "WithExceptionDetails"
- Generate DbUpdateException
- Observer the entire DbContext (all tables) are logged
Expected behaviour
Is there some way to configure the Enriched log WithExceptionDetails fully in the appsettings configuration?
Metadata
Metadata
Assignees
Labels
bugIssues describing a bug or pull requests fixing a bug.Issues describing a bug or pull requests fixing a bug.