Re: Add a method to list the current named logging levels

2022-03-30 Thread Mats Wichmann
On 3/30/22 10:39, Chris Angelico wrote: > New in 3.11: > > https://docs.python.org/3.11/library/logging.html#logging.getLevelNamesMapping > > I'd say it's reasonable to use this, and then to backport it to older > versions by monkeypatching it in (by referencing the internal). You > potentially

Re: Add a method to list the current named logging levels

2022-03-30 Thread Tim Chase
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 "",

Re: Add a method to list the current named logging levels

2022-03-30 Thread Chris Angelico
On Thu, 31 Mar 2022 at 03:33, Edward Spencer wrote: > > 在 2022年3月30日星期三 UTC+1 16:38:26, 写道: > > > On 30 Mar 2022, at 16:11, Edward Spencer wrote: > > > > > > 在 2021年9月3日星期五 UTC+1 18:50:51, 写道: > > On 2 Sep 2021, at 23:38, Dieter Maurer wrote: > > >>> > > >>> Edward Spencer wrote at

Re: Add a method to list the current named logging levels

2022-03-30 Thread Edward Spencer
在 2022年3月30日星期三 UTC+1 16:38:26, 写道: > > On 30 Mar 2022, at 16:11, Edward Spencer wrote: > > > > 在 2021年9月3日星期五 UTC+1 18:50:51, 写道: > On 2 Sep 2021, at 23:38, Dieter Maurer wrote: > >>> > >>> Edward Spencer wrote at 2021-9-2 10:02 -0700: > Sometimes I like to pass the logging

Re: Add a method to list the current named logging levels

2022-03-30 Thread Barry
> On 30 Mar 2022, at 16:11, Edward Spencer wrote: > > 在 2021年9月3日星期五 UTC+1 18:50:51, 写道: On 2 Sep 2021, at 23:38, Dieter Maurer wrote: >>> >>> Edward Spencer wrote at 2021-9-2 10:02 -0700: Sometimes I like to pass the logging level up to the command line params so my user

Re: Add a method to list the current named logging levels

2022-03-30 Thread Edward Spencer
在 2021年9月3日星期五 UTC+1 18:50:51, 写道: > > On 2 Sep 2021, at 23:38, Dieter Maurer wrote: > > > > Edward Spencer wrote at 2021-9-2 10:02 -0700: > >> Sometimes I like to pass the logging level up to the command line params > >> so my user can specific what level of logging they want. However there

Re: Add a method to list the current named logging levels

2021-09-03 Thread Barry
> On 2 Sep 2021, at 23:38, Dieter Maurer wrote: > > Edward Spencer wrote at 2021-9-2 10:02 -0700: >> Sometimes I like to pass the logging level up to the command line params so >> my user can specific what level of logging they want. However there is no >> easy method for pulling the named

Re: Add a method to list the current named logging levels

2021-09-02 Thread Dieter Maurer
Edward Spencer wrote at 2021-9-2 10:02 -0700: >Sometimes I like to pass the logging level up to the command line params so my >user can specific what level of logging they want. However there is no easy >method for pulling the named logging level names. > >Looking into the code, it would

Add a method to list the current named logging levels

2021-09-02 Thread Edward Spencer
Sometimes I like to pass the logging level up to the command line params so my user can specific what level of logging they want. However there is no easy method for pulling the named logging level names. Looking into the code, it would actually be incredibly easy to implement; in