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.
adding this at the top of
cli.py
but that only printed:
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, andprint
is used elsewhere already._Originally posted by @will-moore in https://github.com/ome/omero-cli-zarr/pull/134#discussion_r1131128468_