Feature request: Add InnerException to Exceptions' structured log #680
Labels
feature-request
New or enhancements to existing features
logging
Logging utility
triage
Pending triage from maintainers
Use case
Hi!
Current implementation leads to logged exceptions to loose valuable information, in particular their inner exceptions. Only
Message
,Source
andStackTrace
are being added to the final structured log.For the following:
We will see this, with the very important inner exception being lost forever:
Solution/User Experience
Given
InnerException
is itself a property of the baseException
class, adding support to also structure log it seems pretty trivial.For the above I would expect this instead:
Obviously the example is for a single child inner exception but, given the serialization is recursive, this would be also be working for inner exceptions within inner exceptions, until the end of the exceptions' tree branch.
Happy to contribute a PR for this, if accepted.
Thanks!
Alternative solutions
N/A
Acknowledgment
The text was updated successfully, but these errors were encountered: