63 lines
1.7 KiB
Plaintext
63 lines
1.7 KiB
Plaintext
{
|
|
"Serilog": {
|
|
"Using": [
|
|
"Serilog.Sinks.Console",
|
|
"Serilog.Sinks.File",
|
|
"Serilog.Enrichers.Thread",
|
|
"Serilog.Enrichers.Environment"
|
|
],
|
|
"MinimumLevel": {
|
|
"Default": "Information",
|
|
"Override": {
|
|
"Microsoft": "Warning",
|
|
"Microsoft.AspNetCore": "Warning",
|
|
"Microsoft.EntityFrameworkCore": "Warning",
|
|
"System": "Warning",
|
|
"System.Net.Http": "Warning",
|
|
"Grpc": "Warning"
|
|
}
|
|
},
|
|
"WriteTo": [
|
|
{
|
|
"Name": "Console",
|
|
"Args": {
|
|
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}",
|
|
"theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console"
|
|
}
|
|
},
|
|
{
|
|
"Name": "File",
|
|
"Args": {
|
|
"path": "/var/log/stellaops/${STELLAOPS_SERVICE_NAME:-.}/stellaops-.log",
|
|
"rollingInterval": "Day",
|
|
"retainedFileCountLimit": 14,
|
|
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [{SourceContext}] [{TraceId}] {Message:lj}{NewLine}{Exception}",
|
|
"fileSizeLimitBytes": 104857600,
|
|
"rollOnFileSizeLimit": true
|
|
}
|
|
}
|
|
],
|
|
"Enrich": [
|
|
"FromLogContext",
|
|
"WithMachineName",
|
|
"WithThreadId",
|
|
"WithEnvironmentName",
|
|
"WithProcessId"
|
|
],
|
|
"Properties": {
|
|
"Application": "StellaOps",
|
|
"ServiceName": "${STELLAOPS_SERVICE_NAME:-Unknown}",
|
|
"Environment": "${ASPNETCORE_ENVIRONMENT:-Production}"
|
|
},
|
|
"Filter": [
|
|
{
|
|
"Name": "ByExcluding",
|
|
"Args": {
|
|
"expression": "Contains(@Message, 'Executing endpoint')"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"AllowedHosts": "*"
|
|
}
|