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
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 "", lin
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 2021-9
在 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 leve
> 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 c
在 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 i
> 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 l
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 actually
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 `logging.__in