PYTHON LOGGING with StreamHandler and FileHandler

dieter dieter at handshake.de
Tue Nov 25 07:47:15 CET 2014


Ganesh Pal <ganesh1pal at 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.




More information about the Python-list mailing list