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 oneofthose
Recipients oneofthose
Date 2018-08-06.20:41:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533588087.55.0.56676864532.issue34350@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 3.6.3 I can do:

import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.info("this does not work")
logging.info("PARTY")
logger.info("this works")

And it outputs:

INFO:root:PARTY
INFO:root:this works


The line 
logging.info("PARTY") 
seems to add a handler which makes the last line work. This is very confusing behavior as it is not obvious that a call to "logging.info" mutates the state of the logging subsystem and affects subsequent logging calls.
History
Date User Action Args
2018-08-06 20:41:27oneofthosesetrecipients: + oneofthose
2018-08-06 20:41:27oneofthosesetmessageid: <1533588087.55.0.56676864532.issue34350@psf.upfronthosting.co.za>
2018-08-06 20:41:27oneofthoselinkissue34350 messages
2018-08-06 20:41:27oneofthosecreate