Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57736

Re: Logging to file and not to console

From Peter Otten <__peter__@web.de>
Subject Re: Logging to file and not to console
Date 2013-10-27 12:18 +0100
Organization None
References <20131027020458.2a314eb9@hanez.org> <l4ion1$tgf$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.1645.1382872697.18130.python-list@python.org> (permalink)

Show all headers | View raw


Peter Otten wrote:

> def levelnames():
>     try:
>         names = logging._nameToLevel
>     except AttributeError:
>         names = (name for name in logging._levelNames if isinstance(name,
> str))

Trainwreck alert :(

I recommend that you use the following list

"DEBUG INFO WARN ERROR CRITICAL".split()

directly rather than fixing the above.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Logging to file and not to console Peter Otten <__peter__@web.de> - 2013-10-27 12:18 +0100

csiph-web