repo-cloner/repo_cloner/lib/logger_setup.py

12 lines
376 B
Python
Raw Normal View History

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)