Python loggers output all messages to stdout in addition to log file

Posted by Jessica Taylor | Updated on

Python loggers output all messages to stdout in addition to log file All logging output is handled by the handlers; just add a logging.StreamHandler() to the root logger.

Here’s an example configuring a stream handler (using stdout instead of the default stderr) and adding it to the root logger:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers