Serilog - Separate files for Information, exception using appsetting.json
问题 I am writing all logs into one file(s) using rolling. But I want to separate them by Information , Warning and Exceptions rolling files. my current configuration is like this "Serilog": { "WriteTo": [ { "Name": "RollingFile", "Args": { "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] {Message}{NewLine}{Exception}", "pathFormat": "logs\\log-{Hour}.log", "rollOnFileSizeLimit ": true, "retainedFileCountLimit ": null, "rollingInterval": "Hour", "fileSizeLimitBytes": 5000000 }