On Jan 16, 2:32 pm, Dotan Barak <dota...@gmail.com> wrote:
> Hi.
>
> I would like to use theloggingmodule and print the following levels to
> the mentioned streams:
>
> CRITICAL    -> stderr
> ERROR         -> stderr
> WARNING   -> stderr
> INFO             -> stdout
> DEBUG         -> stdout
>
> I would like that every message will be printed only once, and for the
> stream that i choose.
> (I failed to find a "maximum level" for the handlers in theloggingmodule).
>
> Thanks in advanced
> Dotan Barak

Peter's answer is good, and you can also look at a slightly different
take on it (for a slightly different requirement - printing INFO only
to stdout, and everything else to stderr).

http://stackoverflow.com/questions/1383254/logging-streamhandler-and-standard-streams/1383365#1383365

Regards,

Vinay Sajip
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to