logger.py 269 B

12345678910
  1. import sys
  2. import logging
  3. logger = logging.getLogger(__name__)
  4. stdout = logging.StreamHandler(stream=sys.stdout)
  5. fmt = logging.Formatter(
  6. "%(asctime)s | %(levelname)s | %(message)s"
  7. )
  8. stdout.setFormatter(fmt)
  9. logger.addHandler(stdout)
  10. logger.setLevel(logging.INFO)