# coding=utf-8
"""
@Time :2026/6/24
@Author :tao.chen
Process-wide loguru configuration. Import `logger` from here in every
module instead of instantiating new loggers.
Levels used in this project:
DEBUG - entry/exit of public tools, subprocess commands, file I/O paths
INFO - business events (job submitted, status changed, connection saved)
WARNING - recoverable problems (transient YARN issues, retry-able)
ERROR - raised exceptions (caller will see the traceback)
"""
import sys
from loguru import logger
logger.remove()
logger.add(
sys.stderr,
level="DEBUG",
format=(
"{time:HH:mm:ss.SSS} | "
"{level: <7} | "
"{name}:{function}:{line} - "
"{message}"
),
)