Skip to content

Instantly share code, notes, and snippets.

Avatar

Eugene kuznetsov-e

View GitHub Profile
View gist:d1d83635388ae8856d0127bf58e48a80
import logging
# add filemode="w" to overwrite
logging.basicConfig(filename="sample.log", level=logging.INFO)
logging.debug("This is a debug message")
logging.info("Informational message")
logging.error("An error has happened!")