仅当它们是任何日志时,才使用Serilog创建日志文件
我想通过API请求使用Serilog在不同的日志文件上编写不同的日志。 问题是当在loggerConfiguration()
中配置的日志文件时,它们都会创建任何日志。 问题在于我每个请求都有许多空日志文件。 也许Serilog有能力如果文件没有登录来写入该文件,则无法创建文件?还是解决此问题的其他解决方案?
I want to write different logs on different log files with Serilog by API request.
The problem is when the log file configured within LoggerConfiguration()
, they created no matter if their is any logs or not.
The problem is that I have many empty log files per request.
Maybe Serilog has the ability not to create file if it has no logs to write to that file? or maybe any other solution for this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论