mirror of
https://github.com/simon987/parler_feed.git
synced 2025-04-04 08:23:04 +00:00
14 lines
367 B
Python
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)
|