{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},
"Enrich": [ "FromLogContext", "WithThreadId" ],
"WriteTo": [
{
"Name": "Console",
"Args": {
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {SourceContext} {ThreadId} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "Error",
"Args": {
"path": "./Logs/Error/log.txt",
"formatter": "Serilog.Formatting.Compact.CompactJsonFormatter",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {SourceContext} {ThreadId} [{Level:u3}] {Message:lj}{NewLine}{Exception}",
"shared": true,
"rollOnFileSizeLimit": true,
"fileSizeLimitBytes": 102400000,
"retainedFileCountLimit": 365
}
},
{
"Name": "File",
"Args": {
"path": "./Logs/Info/log.txt",
"formatter": "Serilog.Formatting.Compact.CompactJsonFormatter",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {SourceContext} {ThreadId} [{Level:u3}] {Message:lj}{NewLine}{Exception}",
"shared": true,
"rollOnFileSizeLimit": true,
"fileSizeLimitBytes": 102400000,
"retainedFileCountLimit": 365
}
}
]
}
}
有没有大佬麻烦看下为什么不产生Error文件夹的日志,只有Info的呢,感谢感谢