We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd like to do something like the following. Is it possible?
appsettings.json
{ "Serilog": { "MinimumLevel": { "ControlledBy": { "Serilog.Core.LoggingLevelSwitch": "Debug" } } } }
program.cs
var configuration = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", reloadOnChange: true) //... .Build(); Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(configuration) //... .CreateLogger();
My intent is to modify the config file and have the log level change without restarting the application.
The text was updated successfully, but these errors were encountered:
Hi Dave, this should just work straight out of the box with the normal "MinimumLevel": "Debug" syntax:
"MinimumLevel": "Debug"
https://github.com/serilog/serilog-settings-configuration/blob/dev/src/Serilog.Settings.Configuration/Settings/Configuration/ConfigurationReader.cs#L69
Not having any luck with it?
Sorry, something went wrong.
I thought it was a far fetched ask and haven't worked up a test. Thanks for answering :-)
No branches or pull requests
I'd like to do something like the following. Is it possible?
appsettings.json
program.cs
My intent is to modify the config file and have the log level change without restarting the application.
The text was updated successfully, but these errors were encountered: