Skip to content
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

Add --verbose flag to control log level #28

Closed
tpwo opened this issue Apr 3, 2022 · 0 comments
Closed

Add --verbose flag to control log level #28

tpwo opened this issue Apr 3, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@tpwo
Copy link
Owner

tpwo commented Apr 3, 2022

With a new approach in logging introduced in 334330f, it will be a good idea to allow for easy modification of the log level without changing the source code.

I like the idea with count action in argparse which literally counts how many times a flag was passed. A simple proposal:

pyzet show
# 0 times, WARNING log level (because we sometimes show warnings to the user)
pyzet -v show
# 1 time, INFO log level
pyzet -vv show
# 2 times, DEBUG log level
pyzet -vvv show
# 3 times, still DEBUG log level because we don't want to go further
@tpwo tpwo added the enhancement New feature or request label Apr 3, 2022
@tpwo tpwo closed this as completed in afe99ad Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant