Doodelusion
Doodelusion

Reputation: 11

How to log the trace using Serilog?

I would like to log parts of the System.Diagnostics.Trace using Serilog. Specifically, I am using Avalonia and want to log binding failures. I know how to get Avalonia to write binding related information to the trace, but I don't know how to integrate Serilog with the trace. Of course I could just implement a rudimentary TraceListener using my Logger instance, but I assume there is some kind of built-in support?

I know there is serilog-diagnostics-tracelistener (https://github.com/serilog-contrib/serilog-diagnostics-tracelistener) but it seems to no longer be maintained. There is also serilog-tracing (https://github.com/serilog-tracing/serilog-tracing), but it seems to only write logs for explicitly supported frameworks and focus on writing traces yourself.

Upvotes: 1

Views: 86

Answers (0)

Related Questions