parler_feed/util.py

14 lines
367 B
Python

import logging
import sys
from logging import StreamHandler
logger = logging.getLogger("default")
logger.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s <%(threadName)s> %(levelname)-5s %(message)s')
for h in logger.handlers:
logger.removeHandler(h)
handler = StreamHandler(sys.stdout)
handler.formatter = formatter
logger.addHandler(handler)