You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We already use the log file generation with Serilog.Sinks.File in our .NET 6 project and want to add the compressed log file output to a separate folder archiving the logs. However, the created compressed files are corrupted, they are invalid.
We already use the log file generation with Serilog.Sinks.File in our .NET 6 project and want to add the compressed log file output to a separate folder archiving the logs. However, the created compressed files are corrupted, they are invalid.
Serilog is configured via appconfig.json:
"Serilog": {
![Log_error1](https://user-images.githubusercontent.com/29065511/231440896-78fa1f6d-56ad-4cbf-9010-776813dea1ad.jpg)
![Log_error2](https://user-images.githubusercontent.com/29065511/231441507-4e4ee345-3e3c-4a0a-8c16-97c1cfdded36.jpg)
"Using": [ "SeriLog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.Async" ],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},
"WriteTo": [
{
"Name": "Console"
},
{
"Name": "File",
"Args": {
"path": "Logs/log.gz",
"rollingInterval": "Day",
"formatter": "Serilog.Formatting.Json.JsonFormatter, Serilog",
"hooks": "Serilog.Sinks.File.GZip.GZipHooks, Serilog.Sinks.File.GZip"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/log.log",
"rollingInterval": "Day",
"formatter": "Serilog.Formatting.Json.JsonFormatter, Serilog"
}
}
],
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
"Properties": {
"Application": "MyApplication"
}
}
The text was updated successfully, but these errors were encountered: