104 lines
5.1 KiB
JSON
104 lines
5.1 KiB
JSON
{
|
|
"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, 'SPTarkov.Server.Core.Servers.Http.RequestLogger')"
|
|
}
|
|
}
|
|
],
|
|
"WriteTo": [
|
|
{
|
|
"Name": "Logger",
|
|
"Args": {
|
|
"configureLogger": {
|
|
"Filter": [
|
|
{
|
|
"Name": "ByExcluding",
|
|
"Args": {
|
|
"expression": "StartsWith(SourceContext, 'SPTarkov.Server.Core.Utils.Logger.FileLogger')"
|
|
}
|
|
}
|
|
],
|
|
"WriteTo": [
|
|
{
|
|
"Name": "Console",
|
|
"Args": {
|
|
"formatter": "SPTarkov.Server.Logger.ConsoleFormatter::Default, SPTarkov.Server"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Name": "File",
|
|
"Args": {
|
|
"formatter": "SPTarkov.Server.Logger.FileFormatter::Default, SPTarkov.Server",
|
|
"path": "./user/logs/log.txt",
|
|
"fileSizeLimitBytes": "20971520",
|
|
"rollOnFileSizeLimit": true,
|
|
"rollingInterval": "Day"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Name": "Logger",
|
|
"Args": {
|
|
"configureLogger": {
|
|
"Filter": [
|
|
{
|
|
"Name": "ByIncludingOnly",
|
|
"Args": {
|
|
"expression": "StartsWith(SourceContext, 'SPTarkov.Server.Core.Servers.Http.RequestLogger')"
|
|
}
|
|
}
|
|
],
|
|
"WriteTo": [
|
|
{
|
|
"Name": "File",
|
|
"Args": {
|
|
"formatter": "SPTarkov.Server.Logger.FileFormatter::Default, SPTarkov.Server",
|
|
"path": "./user/logs/requests.txt",
|
|
"fileSizeLimitBytes": "20971520",
|
|
"rollOnFileSizeLimit": true,
|
|
"rollingInterval": "Day"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"Enrich": [
|
|
"FromLogContext",
|
|
"WithExceptionDetails"
|
|
]
|
|
}
|
|
}
|