import logging

"""
    Formatter
"""
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt='%Y-%m-%d:%H:%M:%S')

"""
    Set Flask logger
"""

logger = logging.getLogger('FLASK_LOG')
logger.setLevel(logging.DEBUG)
stream_log = logging.StreamHandler()
stream_log.setFormatter(formatter)
logger.addHandler(stream_log)
# if disabled
# logger.disabled = True

[((50, 156), 'logging.Formatter', 'logging.Formatter', (['"""%(asctime)s - %(name)s - %(levelname)s - %(message)s"""'], {'datefmt': '"""%Y-%m-%d:%H:%M:%S"""'}), "('%(asctime)s - %(name)s - %(levelname)s - %(message)s',\n    datefmt='%Y-%m-%d:%H:%M:%S')\n", (67, 156), False, 'import logging\n'), ((193, 223), 'logging.getLogger', 'logging.getLogger', (['"""FLASK_LOG"""'], {}), "('FLASK_LOG')\n", (210, 223), False, 'import logging\n'), ((268, 291), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (289, 291), False, 'import logging\n')]