Message319911
Once a logger or basicConfig() has been called, later calls to basicConfig() are silent ignored. The makes it very difficult to experiment with or teach the various options at the interactive prompt or in a Jupyter notebook.
What we have:
>>> import logging
>>> logging.warning('Too much data')
WARNING:root:Too much data
>>> logging.info('Volume is at 80%')
>>> logging.basicConfig(level=logging.INFO)
>>> logging.info('Volume is at 80%')
>>> # Note, no output was created
What we need:
>>> import logging
>>> logging.warning('Too much data')
WARNING:root:Too much data
>>> logging.info('Volume is at 80%')
>>> logging.basicConfig(level=logging.INFO, restart=True)
>>> logging.info('Volume is at 80%')
INFO:rootVolume is at 80% |
|
Date |
User |
Action |
Args |
2018-06-18 20:39:17 | rhettinger | set | recipients:
+ rhettinger, vinay.sajip |
2018-06-18 20:39:17 | rhettinger | set | messageid: <1529354357.8.0.56676864532.issue33897@psf.upfronthosting.co.za> |
2018-06-18 20:39:17 | rhettinger | link | issue33897 messages |
2018-06-18 20:39:17 | rhettinger | create | |
|