Skip to content

Access LoggingLevelSwitch at runtime #272

New issue

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

Closed
pmiddleton opened this issue Jul 29, 2021 · 1 comment
Closed

Access LoggingLevelSwitch at runtime #272

pmiddleton opened this issue Jul 29, 2021 · 1 comment

Comments

@pmiddleton
Copy link

Is there anyway to programmatically access LoggingLevelSwitch-es configured in the config json? I want to be able to change the logging level at runtime in my service via a web service call.

I see that the LoggingLevelSwitch are stored in a ResolutionContext inside of the IConfigurationReader. However I don't see a way outside of reflection to access them. Am I missing something, or is changing them via a file watcher on the config json the only way to change them at runtime?

@skomis-mm
Copy link
Contributor

skomis-mm commented Aug 13, 2021

Hi @pmiddleton ,

there is no way currently unless to get it via reflection, tracked #206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants