最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - How to log the trace using Serilog? - Stack Overflow

programmeradmin0浏览0评论

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 () but it seems to no longer be maintained. There is also serilog-tracing (), but it seems to only write logs for explicitly supported frameworks and focus on writing traces yourself.

发布评论

评论列表(0)

  1. 暂无评论