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
Description
Bug, asp net core, while app is running if the log file is recreated say from external logrotate built into linux or manually by hand the log is recreated with same permission, serilog completely stops logging infinitely until full restart of application.
Reproduction
start any asp.net core application, start logging, perform a logrotate on the existing log file, serilog will no longer log anything to the new file until the full application is restarted:
pretty much only this code wise builder.Host.UseSerilog((context, loggerConfiguration) => { loggerConfiguration .ReadFrom.Configuration(context.Configuration) });
Expected behavior
after a logrotate has been performed, serilog should be able to keep logging to the new file(eg its same file but deleted then created again), it shouln't "stick" to the non existing file reference
Relevant package, tooling and runtime versions
ubuntu 24.04 with asp.net core 9
The text was updated successfully, but these errors were encountered:
Description
Bug, asp net core, while app is running if the log file is recreated say from external logrotate built into linux or manually by hand the log is recreated with same permission, serilog completely stops logging infinitely until full restart of application.
Reproduction
start any asp.net core application, start logging, perform a logrotate on the existing log file, serilog will no longer log anything to the new file until the full application is restarted:
pretty much only this code wise
builder.Host.UseSerilog((context, loggerConfiguration) => { loggerConfiguration .ReadFrom.Configuration(context.Configuration) });
and json wise pretty basic aswell:
"Serilog": { "Using": [ "Serilog.Sinks.File" ], "MinimumLevel": { "Default": "Information", "Override": { "Microsoft.AspNetCore": "Warning" } }, "WriteTo": [ { "Name": "File", "Args": { "path": "/var/log/example.log", "formatter": "Serilog.Formatting.Json.JsonFormatter, Serilog" } } ] },
Expected behavior
after a logrotate has been performed, serilog should be able to keep logging to the new file(eg its same file but deleted then created again), it shouln't "stick" to the non existing file reference
Relevant package, tooling and runtime versions
ubuntu 24.04 with asp.net core 9
The text was updated successfully, but these errors were encountered: