You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# assuming loglevel is bound to the string value obtained from the
# command line argument. Convert to upper case to allow the user to
# specify --log=DEBUG or --log=debug
numeric_level = getattr(logging, loglevel.upper(), None)
if not isinstance(numeric_level, int):
raise ValueError('Invalid log level: %s' % loglevel)
logging.basicConfig(level=numeric_level, ...)
Which allows us to pass the desired logging level as cmd line option.
Problem
Our logging system is not as good as it could be.
Proposed Solution
I propose doing something like this:
Which allows us to pass the desired logging level as cmd line option.
See more context on how to implement it here: https://docs.python.org/3/howto/logging.html
The text was updated successfully, but these errors were encountered: