I'm using Serilog as my logging framework (with Seq as my log sink). When logging exceptions I'm using something like:
log.Error(ex, "Operation Failed");
My application makes heavy use of async/await methods. When unhandled exceptions occur the stack traces are very hard to read. There is a nuget package that cleans up async stack traces (https://github.com/aelij/AsyncFriendlyStackTrace). This creates an extension method to give you access to a modified/clean stack trace:
ex.ToAsyncString()
I'd like to be able to use this library to intercept the stack trace before it is written to Seq and instead log the clean/modified stack trace.
Is there a way with Serilog/Seq to control the exact output of the error string that is sent to the log sink?