[issue37857] Setting logger.level directly has no effect due to caching in 3.7+

Vinay Sajip report at bugs.python.org
Tue Sep 10 05:03:27 EDT 2019


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> are we here to punish people

No, that's not what I'm saying. But it's not a priority to support situations where people don't follow published APIs and still expect things to work the way they would like. I would prefer people to use setLevel(), as it helps to have consistent usage.

> Certainly the Linux kernel and Windows both have a philosophy of not breaking working userspace code

It's Python's philosophy, too. The philosophy is that of not breaking userspace code *which follows published APIs*. If you use unpublished APIs or rely on implementation details, you're generally on your own. That's the situation here, in reference to code that's out in the wild setting the attribute directly rather than via setLevel().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37857>
_______________________________________


More information about the Python-bugs-list mailing list