Skip to content

Instantly share code, notes, and snippets.

View e-grn's full-sized avatar

Eugene e-grn

View GitHub Profile
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!")