Skip to content Skip to sidebar Skip to footer

Python Logging: Disable Output To Stdout

I'm trying to make a program use only the SysLogHandler instance for logging and no other handlers. I expect it to not log to any files or stdout. self.logger = logging.getLogg

Solution 1:

You have different ways to do so:

-set logger.propagate to false.

And give it to your logger.

logging.StreamHandler(stream=None)

Post a Comment for "Python Logging: Disable Output To Stdout"