New submission from Victor Porton <[email protected]>:
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 <[email protected]>
<https://bugs.python.org/issue35530>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com