Closed
Description
The default logging level for logging.getLogger()
in CPython is 30 (WARNING
):
Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> l = logging.getLogger()
>>> l.getEffectiveLevel()
30
>>> l1 = logging.getLogger("foo")
>>> l1.getEffectiveLevel()
30
However, in this library, it is 0. It should be be consistent with CPython.
>>> import adafruit_logging
>>> l = adafruit_logging.getLogger()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: function takes 1 positional arguments but 0 were given
>>> l = adafruit_logging.getLogger("foo")
>>> l.getEffectiveLevel()
0
Note also that you can't give no arg to getLogger()
. I'll open a separate issue for that.
Metadata
Metadata
Assignees
Labels
No labels