serilog-settings-appsettings
serilog-settings-appsettings copied to clipboard
Watch the config file at runtime
Try to figure out the feature about watch the App.config at runtime like log4net and NLog https://stackoverflow.com/questions/25477415/how-can-i-reconfigure-serilog-without-restarting-the-application https://stackoverflow.com/questions/50715913/serilog-equivalent-to-log4net-config-watch The above two links have no useful info about reload all settings in App.config.
Here is another link https://stackoverflow.com/questions/53449596/reload-serilog-json-configuration-on-changes-in-net-core-2-1/60474967#60474967 The current Serilog implementation (2.9.0) is such that it is unable to fully reload settings. To work around this issue without introducing additional dependencies, avoid creating static loggers and follow the example provided here: https://github.com/akovac35/Logging/blob/v1.0.4/src/com.github.akovac35.Logging.Serilog/SerilogHelper.cs
Will you consider to implement this feature?
Related: https://github.com/nblumhardt/serilog-reload
Oh I wasn't aware of that repo yet! I am using tagcode/serilog-settings-reloader currently (with great success). Any two cents on the difference and general state of yours, Nick?
Hi Christopher-Marcel; the aim currently is to get as close to zero-overhead as possible once the logger is "frozen" - mapping closely to how the ASP.NET Core framework is first bootstrapped, and then given a final logger configuration that does not change. I think Serilog.Settings.Reloader is currently more general, and is undoubtedly a bit more mature :-)