Skip to content

Instantly share code, notes, and snippets.

@e-grn
Created October 11, 2019 10:40
Show Gist options
  • Save e-grn/d1d83635388ae8856d0127bf58e48a80 to your computer and use it in GitHub Desktop.
Save e-grn/d1d83635388ae8856d0127bf58e48a80 to your computer and use it in GitHub Desktop.
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!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment