jira-tracker/jira_tracker/logger.py
2021-02-04 18:27:19 -05:00

16 lines
359 B
Python

import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)
def enable_debug_logger():
logger.setLevel(logging.DEBUG)
ch.setLevel(logging.DEBUG)