DEV Community

loading...

Discussion on: The Pythonic Guide To Logging

Collapse
wlbentley profile image
W L Bentley • Edited

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)
Collapse
sidhanthp profile image
Sid Panjwani Author

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

Forem Open with the Forem app