import sys from loguru import logger logger.remove() logger.add(sink=sys.stdout, format="{time:YYYY-MM-DD HH:mm:ss}" " | {level: <8}" " | {line}" " | {message}") log = logger.opt(colors=True)