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}") logger = logger.opt(colors=True)