This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients rhettinger, vinay.sajip
Date 2018-06-18.20:39:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529354357.8.0.56676864532.issue33897@psf.upfronthosting.co.za>
In-reply-to
Content
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%
History
Date User Action Args
2018-06-18 20:39:17rhettingersetrecipients: + rhettinger, vinay.sajip
2018-06-18 20:39:17rhettingersetmessageid: <1529354357.8.0.56676864532.issue33897@psf.upfronthosting.co.za>
2018-06-18 20:39:17rhettingerlinkissue33897 messages
2018-06-18 20:39:17rhettingercreate