from loguru import logger as loguru_logger
from .logger import setup_logger


runner = setup_logger("runner", is_console=True)
""" 运行器日志 """
calculator = setup_logger("calculator", is_console=True)
""" 计算器日志 """
connector = setup_logger("connector", is_console=True)
""" 连接器日志 """
monitor = setup_logger("monitor", is_console=True)
""" 监控器日志 """
loader = setup_logger("loader", is_console=True)
""" 载入器日志 """


event_backtest = setup_logger("event_backtest") 
""" 事件回测日志 """
backtest_glance = setup_logger("backtest_glance")
""" 回测策略收益日志 """
vector_backtest = setup_logger("vector_backtest")
""" 向量回测日志 """
binning_backtest = setup_logger("binning_backtest")
""" 分箱回测日志 """
grid_backtest = setup_logger("grid_backtest")
""" 网格回测日志 """
screen = setup_logger("screen")
""" 选债/选股日志 """
formula_compute = setup_logger("formula_compute")
""" 公式计算日志 """


def cleanup_loggers() -> None:
    """ 清理日志 """
    loguru_logger.remove()
