How to Enable Extra Logging in the Configuration?
Logging supports different log levels to have the desired granularity. Default logging is set to Information.
This can be configured using the appsettings.json file from the configurations directory (on Linux systems, that means /etc/mdss/configurations).
{ "Serilog": { "Using": [], "MinimumLevel": { "Default": "Information", "Override": { "Microsoft": "Warning", "System": "Warning", "Microsoft.Hosting.Lifetime": "Warning" } }, "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithProcessName", "WithThreadId" ], "WriteTo": [ { "Name": "File", "Args": { "buffered": false, "fileSizeLimitBytes": 500000000, "outputTemplate": "[{Timestamp:u}] [{Level}] {Namespace}: {Message:lj}{NewLine}{Exception}", "path": "logs/log.txt", "retainedFileCountLimit": "10", "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ] }}To change log level adjust MinimumLevel.Default with the following:
- Debug
- Information
- Warning
- Error
- Fatal
On Linux MinimumLevel.Default can be changed during running.
On Windows a restart is required for any change
Default maximum size of a log file is 500Mb which can be adjust by changing fileSizeLimitBytes
Rolling interval is configured to be daily by the rollingIntervalor on file size limit rollOnFileSizeLimit: true
Default retained files limit is set to 10 by retainedFileCountLimit
