Re: Getting the logging level from text representation

2015-09-02 Thread Laura Creighton
In a message of Wed, 02 Sep 2015 12:14:44 +0200, Antoon Pardon writes: See: https://docs.python.org/3.5/library/logging.html#levels you can just use 30 everywhere for warning, and that is what Logger.getEffectiveLevel() will tell you even if you initialised it with the text form. Laura -- https

Re: Getting the logging level from text representation

2015-09-02 Thread Antoon Pardon
Op 02-09-15 om 11:50 schreef Peter Otten: > Antoon Pardon wrote: > >> I am writing an application that will do the necessary logging. >> However I want the level of logging to be deciced by a value >> in a config file. Like the following: >> >> loglevel = WARNING >> >> But I can't find a function t

Re: Getting the logging level from text representation

2015-09-02 Thread Peter Otten
Antoon Pardon wrote: > I am writing an application that will do the necessary logging. > However I want the level of logging to be deciced by a value > in a config file. Like the following: > > loglevel = WARNING > > But I can't find a function that does this. > > The reverse is possible with l

Getting the logging level from text representation

2015-09-02 Thread Antoon Pardon
I am writing an application that will do the necessary logging. However I want the level of logging to be deciced by a value in a config file. Like the following: loglevel = WARNING But I can't find a function that does this. The reverse is possible with logging.getLevelName. The documentation a