pytex/PyTeX/logger/logger.py

13 lines
330 B
Python
Raw Normal View History

2022-02-04 11:39:15 +01:00
import logging
2022-02-05 18:16:27 +01:00
formatter = logging.Formatter("[{name}] [{levelname}] {message}", style="{")
console_logger = logging.StreamHandler()
console_logger.setLevel(logging.INFO)
console_logger.setFormatter(formatter)
logger: logging.Logger = logging.getLogger('PyTeX')
logger.setLevel(logging.INFO)
logger.addHandler(console_logger)