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

Replace print statements with logging #138

Open
joshmoore opened this issue Mar 9, 2023 · 0 comments
Open

Replace print statements with logging #138

joshmoore opened this issue Mar 9, 2023 · 0 comments

Comments

@joshmoore
Copy link
Member

          I tried the example at https://docs.python.org/3/howto/logging.html#changing-the-format-of-displayed-messages

adding this at the top of cli.py

import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
logging.debug('This message should appear on the console')
logging.info('So should this')
logging.warning('And this, too')

but that only printed:

WARNING:root:And this, too

So it looks like something else is calling logging.basicConfig before me, so that my call above is then ignored?

Agreed that we could look to remove print statements in a different PR, since this one is already quite long, and print is used elsewhere already.

Originally posted by @will-moore in #134 (comment)

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

1 participant