Message323224
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. |
|
Date |
User |
Action |
Args |
2018-08-06 20:41:27 | oneofthose | set | recipients:
+ oneofthose |
2018-08-06 20:41:27 | oneofthose | set | messageid: <1533588087.55.0.56676864532.issue34350@psf.upfronthosting.co.za> |
2018-08-06 20:41:27 | oneofthose | link | issue34350 messages |
2018-08-06 20:41:27 | oneofthose | create | |
|