Aar*_*ver 2 serilog rollingfilesink
RollingFile接收器的当前输出日期时间如下
2015-04-06 18:40:54.400 +10:00 [Information] Hello World!
Run Code Online (Sandbox Code Playgroud)
无论如何要删除TimeZone偏移量?+10:00.实现以下输出;
2015-04-06 18:40:54.400 [Information] Hello World!
Run Code Online (Sandbox Code Playgroud)
在我的情况下,时区偏移是多余的绒毛,这只是混乱我的文本日志.
您可以outputTemplate为.RollingFile()配置方法指定参数:
.WriteTo.RollingFile(
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level}] {Message}{NewLine}{Exception}")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3474 次 |
| 最近记录: |