import logging log = logging.getLogger('root') log.setLevel(logging.ERROR) # DEBUG > INFO > WARNING > ERROR > CRITICAL logging.basicConfig( format='[%(asctime)s] %(levelname)s @ %(module)s.%(funcName)s()#%(lineno)d: %(message)s' )