Add a method to list the current named logging levels

Tim Chase python.list at tim.thechases.com
Wed Mar 30 12:48:12 EDT 2022


On 2022-03-30 16:37, Barry wrote:
> Is logging.getLevelNamesMapping() what you are looking for?

Is this in some version newer than the 3.8 that comes stock on my
machine?

  $ python3 -q
  >>> import logging
  >>> logging.getLevelNamesMapping()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  AttributeError: module 'logging' has no attribute 'getLevelNamesMapping'

-tkc


More information about the Python-list mailing list