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


Groups > comp.lang.python > #81489

Re: PYTHON LOGGING with StreamHandler and FileHandler

From dieter <dieter@handshake.de>
Subject Re: PYTHON LOGGING with StreamHandler and FileHandler
Date 2014-11-25 07:47 +0100
References <CACT3xuWoUO=vdoN0hmPU_283W4ihz=+z4WMgMV3kOBFiZEyyww@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16267.1416898205.18130.python-list@python.org> (permalink)

Show all headers | View raw


Ganesh Pal <ganesh1pal@gmail.com> writes:

> The below program logs all the messages to the log file and displays the
> same on the console .
>
> Please suggest how do I ensure that error and warning log levels go ONLY to
> stdout and/or stder

You read the handler related documentation of the logging module.
When I remember right, you will find there a method allowing you
to control which message levels are handled by the the respective handler.

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


Thread

Re: PYTHON LOGGING with StreamHandler and FileHandler dieter <dieter@handshake.de> - 2014-11-25 07:47 +0100

csiph-web