[issue43858] Provide method to get list of logging level names

2021-05-30 Thread Andy Lowry


Andy Lowry  added the comment:

@andrei.avk Yes, that sounds just fine. Many thanks.

--

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



[issue43858] Provide method to get list of logging level names

2021-04-15 Thread Andy Lowry


New submission from Andy Lowry :

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 
<https://bugs.python.org/issue43858>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com