{ "Logging": { "LogLevel": { "Default": "Trace", "System": "Information", "Microsoft": "Information", "Microsoft.AspNetCore.Hosting.Diagnostics": "Warning", "Microsoft.AspNetCore.Server.Kestrel.Connections": "Information" } }, "Serilog": { "WriteTo": [ { "Name": "Async", "Args": { "configure": [ { "Name": "Logger", "Args": { "configureLogger": { "Filter": [ { "Name": "ByExcluding", "Args": { "expression": "StartsWith(SourceContext, 'Core.Servers.Http.RequestLogger')" } } ], "WriteTo": [ { "Name": "Console", "Args": { "formatter": "Server.Logger.ConsoleFormatter::Default, Server" } } ] } } }, { "Name": "Logger", "Args": { "configureLogger": { "Filter": [ { "Name": "ByIncludingOnly", "Args": { "expression": "StartsWith(SourceContext, 'Core.Servers.Http.RequestLogger')" } } ], "WriteTo": [ { "Name": "File", "Args": { "formatter": "Server.Logger.FileFormatter::Default, Server", "path": "./user/logs/requests.txt", "fileSizeLimitBytes": "20971520", "rollOnFileSizeLimit": true, "rollingInterval": "Day" } } ] } } }, { "Name": "File", "Args": { "formatter": "Server.Logger.FileFormatter::Default, Server", "path": "./user/logs/log.txt", "fileSizeLimitBytes": "20971520", "rollOnFileSizeLimit": true, "rollingInterval": "Day" } } ] } } ], "Enrich": [ "FromLogContext", "WithExceptionDetails" ] } }