Skip to content Skip to sidebar Skip to footer

Python Logging Is Failing

Just started to look up on the logging module and created a dummy program to understand the logger, handler and formatter. Here is the code # logging_example.py import logging fro

Solution 1:

You have added log-level to the handlers but not to the logger. Which means, handler would have logged the message had the logger passed it. But since the logger threshold is higher it got dropped.

See this link

Add log-level to the logger also. After adding the handlers:

logger.setLevel(logging.DEBUG)

Post a Comment for "Python Logging Is Failing"