IssueRaiser

DbCommand failure message doesn't include exception details

Version: EF Core 5.0 We see in our logs many command error messages. It says "Failed executing DbCommand ..." https://github.com/dotnet/efcore/blob/26c0d2a8f3eab7d92ae9b7bb9dc7aa31a336bd90/src/EFCore.Relational/Properties/RelationalStrings.resx#L449-L452 We want to know what the exception is so that we can troubleshoot the problem. However, it seems that EF core doesn't include the exception in the logged message. https://github.com/dotnet/efcore/blob/809fe7a219c99fbe4f3576ef42bd084d4a6ce056/src/EFCore.Relational/Diagnostics/RelationalLoggerExtensions.cs#L1124-L1139 Was this an oversight or is this by design? How can we see the exception?

Posted by clement911 on Mar 27, 2021, 11:07 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

github (Software)

DbCommand failure message doesn't include exception details

clement911Mar 27, 2021, 11:07 AM

Version: EF Core 5.0 We see in our logs many command error messages. It says "Failed executing DbCommand ..." https://github.com/dotnet/efcore/blob/26c0d2a8f3eab7d92ae9b7bb9dc7aa31a336bd90/src/EFCore.Relational/Properties/RelationalStrings.resx#L449-L452 We want to know what the exception is so that we can troubleshoot the problem. However, it seems that EF core doesn't include the exception in the logged message. https://github.com/dotnet/efcore/blob/809fe7a219c99fbe4f3576ef42bd084d4a6ce056/src/EFCore.Relational/Diagnostics/RelationalLoggerExtensions.cs#L1124-L1139 Was this an oversight or is this by design? How can we see the exception?

Comments (0)

No comments yet. Start the discussion.

Comment on this issue