We are using asp.net Core 1.1 and are using SeriLog to create log file within the application.
Now to control size of log file, I added attribute fileSizeLimitBytes
"Serilog": {
"MinimumLevel": "Debug",
"WriteTo": [
{
"Name": "RollingFile",
"Args": {
"pathFormat": "Logs/LogFileConf-{Date}-test.Log",
"fileSizeLimitBytes": 500000
}
}
],
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
"Properties": {
"Application": "Sample",
"Environment": "Test"
}
},
In this case, writing to log file stopped and when I removed above attributes, writing to log file again started working
So I have added as follows "pathFormat": "Logs/LogFileConf-{Date}-test.Log", "fileSizeLimitBytes": 500000
I am not sure what I am missing here.
Project.json contains following reference.
"Serilog.Extensions.Logging": "1.2.0",
"Serilog.Sinks.RollingFile": "3.0.1",
"Serilog.Settings.Configuration": "2.1.0"
Can anybody help here to solve this issue?