Skip to content

Instantly share code, notes, and snippets.

@initialkommit
Last active November 25, 2018 08:31
Show Gist options
  • Save initialkommit/860d287a087a0f211ec0df1821b418a8 to your computer and use it in GitHub Desktop.
Save initialkommit/860d287a087a0f211ec0df1821b418a8 to your computer and use it in GitHub Desktop.
logging by level
WARNING:root:This is a warning message
ERROR:root:This is an error message
CRITICAL:root:This is a critical message
import logging
logging.debug('This is a debug message')
logging.info('This is an info message')
logging.warning('This is a warning message')
logging.error('This is an error message')
logging.critical('This is a critical message')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment