When using the default ASP.NET core logging in combination with Serilog, is it possible to write errors to errors.log and information to informations.log
using Microsoft.Extensions.Logging;
using Serilog;
loggerFactory.AddSerilog();
loggerFactory.AddFile(Configuration.GetSection("Logging"));
Appsettings.json:
"Logging": {
"PathFormat": "path-{Date}.log",
"IncludeScopes": false,
"LogLevel": {
"Default": "Information",
"System": "Information",
"Microsoft": "Information"
}
}
I want one logging file where I can see the requests which are done and stuff like that, just the info log. And one log with errors for debugging purposes. How can I log different things to 2 files?
