62 lines
1.9 KiB
JSON
62 lines
1.9 KiB
JSON
{
|
|
"Serilog": {
|
|
"Using": [
|
|
//"Serilog.Sinks.Console",
|
|
//"Serilog.Sinks.Debug",
|
|
"Serilog.Sinks.Seq",
|
|
"Serilog.Settings.Configuration",
|
|
"Serilog.Exceptions",
|
|
"Serilog.Enrichers.Span",
|
|
"Serilog.Enrichers.Thread",
|
|
"Serilog.Enrichers.Process",
|
|
"Serilog.Enrichers.Environment"
|
|
],
|
|
"Enrich": [
|
|
"FromLogContext",
|
|
// Add full exception details using Serilog.Exceptions https://github.com/RehanSaeed/Serilog.Exceptions.
|
|
"WithExceptionDetails",
|
|
// Add the username and machine name to the logs using Serilog.Enrichers.Environment https://github.com/serilog/serilog-enrichers-environment.
|
|
"WithEnvironmentUserName",
|
|
"WithMachineName",
|
|
// Add the process ID and name to the logs using Serilog.Enrichers.Process https://github.com/serilog/serilog-enrichers-process.
|
|
"WithProcessId",
|
|
"WithProcessName",
|
|
// Add open telemetry span details using Serilog.Enrichers.Span https://github.com/RehanSaeed/Serilog.Enrichers.Span
|
|
"WithSpan",
|
|
// Add the current thread ID to the logs using Serilog.Enrichers.Thread https://github.com/serilog/serilog-enrichers-thread.
|
|
"WithThreadId"
|
|
],
|
|
|
|
"MinimumLevel": {
|
|
"Default": "Verbose",
|
|
"Override": {
|
|
"Microsoft": "Warning",
|
|
"System": "Warning"
|
|
}
|
|
},
|
|
"WriteTo": [
|
|
{
|
|
"Name": "Seq",
|
|
"Args": {
|
|
"serverUrl": "http://10.129.131.128:7000/",
|
|
"apiKey": "rMuLOepTw0LLF3z5ZqVW"
|
|
}
|
|
},
|
|
{
|
|
"Name": "File",
|
|
"Args": {
|
|
"path": "logs/log.txt",
|
|
"outputTemplate": "{Timestamp:MM-dd HH:mm:ss}[{Level:u3}]{Message}|{Scope}|{ThreadId}|{ThreadName}|{SourceContext:l}{NewLine}{Exception}",
|
|
"rollingInterval": "Day"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Trace",
|
|
"Microsoft.Hosting.Lifetime": "Information"
|
|
}
|
|
}
|
|
}
|