New submission from Raymond Hettinger <raymond.hettin...@gmail.com>:
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% ---------- assignee: vinay.sajip components: Library (Lib) messages: 319911 nosy: rhettinger, vinay.sajip priority: normal severity: normal status: open title: Add a restart option to logging.basicConfig() type: enhancement versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33897> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com