-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Change log level at runtime? #425
Comments
|
@mrichman please close this issue as your question has been answered. |
The actual answer is correct, but it's not fully formed, which is why there are so many negative reactions to it. So, I think it would be helpful to add a simple example of how this can be used to change the log level at runtime.
In this case, if we run the application with the info flag, we'll get:
And if we run it with the debug flag, we'll get:
This shows how you can dynamically change the log level when running the application. |
Can I change the log level at runtime? For example, if I have a flag
--debug
then setDebugLevel
.I'm using
urfave/cli
(formerlycodegangsta/cli
) to access flags.The text was updated successfully, but these errors were encountered: