New submission from Andy Lowry <and...@nglowry.com>:

It would be useful to have something like a `getLevelNames` method to return 
the current list of level names, ordered by priority.

This currently appears to be available only by accessing a private member, like 
`_levelToName` or `_nameToLevel`.

This functionality is useful, for example, in populating a `choices` list for 
an `argparse` option to allow a user to select a logging level when launching a 
program from a command line.

----------
components: Library (Lib)
messages: 391145
nosy: andylowry
priority: normal
severity: normal
status: open
title: Provide method to get list of logging level names
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43858>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to