Python logging
import logging
logger = logging.getLogger(__name__)
logger.debug('Variable value is X')
logger.info('Thing X is working as expected')
logger.warning('Something unexpected happened (disk space low), software is still working as expected')
logger.error('Serious problem, some task has not been completed')
logger.critical('Program itself cannot continue')