115 lines
4.5 KiB
JSON
115 lines
4.5 KiB
JSON
{
|
|
"Serilog": {
|
|
"Using": [
|
|
"Serilog.Sinks.Console",
|
|
"Serilog.Sinks.File"
|
|
],
|
|
"MinimumLevel": {
|
|
"Default": "Verbose",
|
|
"Override": {
|
|
"Microsoft": "Verbose"
|
|
}
|
|
},
|
|
"WriteTo": [
|
|
{
|
|
"Name": "Logger",
|
|
"Args": {
|
|
"configureLogger": {
|
|
"Filter": [
|
|
{
|
|
"Name": "ByExcluding",
|
|
"Args": {
|
|
"expression": "StartsWith(SourceContext, 'SPTarkov.Server.Core.Servers.Http.RequestLogger')"
|
|
}
|
|
},
|
|
{
|
|
"Name": "ByExcluding",
|
|
"Args": {
|
|
"expression": "SourceContext like 'Microsoft%'"
|
|
}
|
|
}
|
|
],
|
|
"WriteTo": [
|
|
{
|
|
"Name": "Console",
|
|
"Args": {
|
|
"formatter": "SPTarkov.Server.Logger.ConsoleFormatter::Default, SPTarkov.Server"
|
|
}
|
|
},
|
|
{
|
|
"Name": "File",
|
|
"Args": {
|
|
"path": "./user/logs/spt/spt.txt",
|
|
"rollingInterval": "Day",
|
|
"fileSizeLimitBytes": "20971520",
|
|
"rollOnFileSizeLimit": true,
|
|
"formatter": "SPTarkov.Server.Logger.FileFormatter::Default, SPTarkov.Server"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"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/requests.txt",
|
|
"rollingInterval": "Day",
|
|
"fileSizeLimitBytes": "20971520",
|
|
"rollOnFileSizeLimit": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Name": "Logger",
|
|
"Args": {
|
|
"configureLogger": {
|
|
"Filter": [
|
|
{
|
|
"Name": "ByIncludingOnly",
|
|
"Args": {
|
|
"expression": "SourceContext like 'Microsoft%'"
|
|
}
|
|
}
|
|
],
|
|
"WriteTo": [
|
|
{
|
|
"Name": "File",
|
|
"Args": {
|
|
"path": "./user/logs/kestrel/kestrel.txt",
|
|
"rollingInterval": "Day",
|
|
"fileSizeLimitBytes": "20971520",
|
|
"rollOnFileSizeLimit": true,
|
|
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"Enrich": [
|
|
"FromLogContext",
|
|
"WithExceptionDetails",
|
|
"WithThreadId"
|
|
]
|
|
}
|
|
}
|