import logging

logging.basicConfig(level=logging.DEBUG) #this has to be put at the beginning

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