Andrei Kulakov <[email protected]> added the comment:
I can add getLevelNamesDict() which would return a copy of _nameToLevel, which
is currently
_nameToLevel = {
'CRITICAL': CRITICAL,
'FATAL': FATAL,
'ERROR': ERROR,
'WARN': WARNING,
'WARNING': WARNING,
'INFO': INFO,
'DEBUG': DEBUG,
'NOTSET': NOTSET,
}
I think it may be best not to return a list of levels because it's not obvious
that some of them are aliases, if the caller is responsible for making the list
out of the dict, they will be able to decide how to deal with alias levels.
If that sounds good I can make a PR..
----------
nosy: +andrei.avk
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43858>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com