re: The Pythonic Guide To Logging VIEW POST

FULL DISCUSSION
 

Thank you for the useful post. Just a quick correction.

Running the sample code under Logging to a File, the logger is created with a default level of WARNING, so the INFO log record is actually not written to the log file. To include it in the log file, set the logger level to INFO as well:

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
 

Thanks for catching that, I'll leave a note in the article!

code of conduct - report abuse