import logging

LOG_FILENAME = 'example.log'
logging.basicConfig(level = logging.DEBUG, filename = LOG_FILENAME)

logging.debug('debug message')
logging.info('info message')
logging.warning('warning message')
logging.error('error message')
logging.critical('critical message')