Skip to content

Instantly share code, notes, and snippets.

@cdjoubert
Created December 10, 2017 12:09
Show Gist options
  • Save cdjoubert/b5aec3a52f56929ab08c522f0567c346 to your computer and use it in GitHub Desktop.
Save cdjoubert/b5aec3a52f56929ab08c522f0567c346 to your computer and use it in GitHub Desktop.
Example of logging initialisation for python
import logging
from logging import debug, info, warning, error
logging.basicConfig(format="%(lineno)d:%(levelname)s: %(message)s", level=logging.DEBUG)
# example use:
warning("Protocol problem: %s", "connection reset")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment