andrew cooke wrote: > similarly, if i run the following, i see only "done": > > from logging import DEBUG, root, getLogger > > if __name__ == '__main__': > root.setLevel(DEBUG) > getLogger(__name__).debug("hello world") > print('done')
You need a handler. The easiest way to get one is logging.basicConfig(). >>> import logging >>> logging.basicConfig(level=logging.DEBUG) >>> logging.getLogger().debug("goodbye, cruel world") DEBUG:root:goodbye, cruel world Other revolutionary ideas: read the docs <http://docs.python.org/dev/howto/logging.html#logging-basic-tutorial> ;) -- http://mail.python.org/mailman/listinfo/python-list