Source code for low_comm_tools.log_config

from __future__ import annotations

import logging

# Create logger
logging.captureWarnings(True)
[docs] logger = logging.getLogger("low_comm_tools")
logger.setLevel(logging.INFO) # Create console handler and set level to debug
[docs] format_str = "%(asctime)s.%(msecs)03d %(module)s - %(funcName)s: %(message)s"
[docs] formatter = logging.Formatter(format_str, "%Y-%m-%d %H:%M:%S")
[docs] ch = logging.StreamHandler()
ch.setLevel(logging.INFO) ch.setFormatter(formatter) logger.addHandler(ch)