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

2021-06-03 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.11 -Python 3.8 ___ Python tracker

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

2021-06-03 Thread miss-islington
miss-islington added the comment: New changeset 8b93f0e696d3fc60fd311c13d5238da73a35e3b3 by andrei kulakov in branch 'main': bpo-43858: Add logging.getLevelNamesMapping() (GH-26459) https://github.com/python/cpython/commit/8b93f0e696d3fc60fd311c13d5238da73a35e3b3 -- nosy:

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

2021-05-30 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +25054 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26459 ___ Python tracker ___

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

2021-05-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I can add getLevelNamesDict() which would return a copy of _nameToLevel That seem like the best approach. -- assignee: -> vinay.sajip nosy: +rhettinger ___ Python tracker

[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 ___ ___ Python-bugs-list

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

2021-05-17 Thread Andrei Kulakov
Andrei Kulakov 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,

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

2021-04-15 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-04-15 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-04-15 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I agree with you. It would be nice to have a function to list or dictionary of level names. Moreover I suggest that there should be an argument to the function like format_level which can take in "dict:level_name" for returning a dictionary with the level

[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