repo-cloner/repo_cloner/lib/logger_setup.py
Václav Valíček 92bf69f4f3
Minor progress in wizzard
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
2022-08-06 02:11:44 +02:00

12 lines
376 B
Python

import logging
console_logger = logging.StreamHandler()
console_formatter = logging.Formatter(
"%(asctime)-15s.%(msecs)03d :: [%(levelname)8s] :: %(name)-15s :: %(message)s (%(filename)s:%(lineno)s)",
"%Y-%m-%d %H:%M:%S")
# setup logger
console_logger.setFormatter(console_formatter)
log = logging.getLogger("rc")
log.addHandler(console_logger)
log.setLevel(logging.INFO)