-
Notifications
You must be signed in to change notification settings - Fork 3.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
Changing log level of DbUpdateConcurrencyException #30429
Comments
Note for triage: this looks like a bug. @dandenton I don't think there is a way to filter out only the |
Any chances to have this addressed in EF Core 7, please? Thank you! |
I would note that we haven't seen any issues lowering the log level of all SaveChangesFailed errors.
EF logs it as Debug then bubbles up the exception so we'd always end up logging it again anyway. |
Ok, if it bubbles up the exception, then it should be fine. Thank you for the prompt answer. |
We're in the process of updating from v6 to v7 and we're getting a lot more bloat in the logs when it comes to concurrency errors. It looks like that part of the changes for intercepting concurrency errors (which is great!) with #28315 changed that event to use the base event id of
SaveChangesFailed = 10000
rather thanOptimisticConcurrencyException = 10006
We've tried
options.ConfigureWarnings(w => w.Log((CoreEventId.OptimisticConcurrencyException, LogLevel.Debug)));
and
options.ConfigureWarnings(w => w.Ignore(CoreEventId.OptimisticConcurrencyException));
but it still logs as an error.
What is the recommended way of changing DbUpdateConcurrencyException logging from an error to debug? Do we really need to suppress all SaveChangesFailed errors?
The text was updated successfully, but these errors were encountered: