Skip to content

How to change the logging level at runtime? #5989

Answered by tad-lispy
tad-lispy asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you @mockersf. Your answer hinted me in a right direction. If one thinks about it, "on startup" is also "at runtime". It only means that for the change to take effect, the app must be restarted. This satisfies my use case, since it doesn't require re-deployment, only a page reload. With that in mind I needed a way to pass some user provided flags to the app as it starts. On the web, a natural interface for that are query parameters. This commit shows how to set the log level using URL query parameter: https://gitlab.com/tad-lispy/bevy-animated-sprite-playground/-/commit/1ba23120d3d1c4b7384437e0f87ff73cbd87650b. I hope it will be useful for someone,

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mockersf
Comment options

Answer selected by tad-lispy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants