[New-bugs-announce] [issue35530] Counter-intuitive logging API
Victor Porton
report at bugs.python.org
Tue Dec 18 19:09:09 EST 2018
New submission from Victor Porton <porton at narod.ru>:
The following script:
#/usr/bin/env python3
import logging
logger = logging.getLogger(name='main')
logger.setLevel(logging.INFO)
logger.error('XXX')
logging.error('ZZZ')
logger.error('XXX')
outputs
XXX
ERROR:root:ZZZ
ERROR:main:XXX
That is counter-intuitive: two logger.error('XXX') operators should output the same string, not two different strings "XXX" and "ERROR:main:XXX".
Please discuss how to make Python behave as a user could expect.
----------
components: Library (Lib)
messages: 332103
nosy: porton
priority: normal
severity: normal
status: open
title: Counter-intuitive logging API
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35530>
_______________________________________
More information about the New-bugs-announce
mailing list