LevelSwitch does not update through appsetting.json #504
juanes1220
started this conversation in
General
Replies: 1 comment 1 reply
-
Hi @juanes1220! Thanks for the heads up! We had such an issue reported a while ago (#470) but then closed it recently because I was not able to reproduce the problem quickly and the reporter did not respond anymore. From what I understood from the Serilog core documents and other Sinks, there should be a possibility to set the switch in the config file during runtime. It just seems not to work currently with our MSSQL sink. Can you please give us a complete small sample app to reproduce your problem? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm trying to get the LevelSwitch property to update through the appsetting.json file but I haven't had any luck.
This is how I'm setting Serilog
When I change the controlSwitch from Information to Debug, I should see debug events in the database but this isn't happening. I tested the same setup with the Console sink and it does apply the level change during runtime.
The sample code doesn't have any examples on how to set this up in the appsettings file but I found this in one of the examples
Does the package support changing the log level through the appsettings or do I have to set it through code?
Thanks in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions