#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from loguru import logger
import sys
import os

# 移除默认处理器
logger.remove()

# 添加控制台输出
logger.add(
    sys.stdout,
    format="<green>{time:HH:mm:ss}</green> | <level>{level: <8}</level> | <level>{message}</level>",
    level="INFO",
    colorize=True
)

print("=== Loguru Test ===")
logger.info("This is an info message")
logger.success("This is a success message")
logger.warning("This is a warning message")
logger.error("This is an error message")
logger.debug("This debug message won't show (level too high)")

# 测试中文输出
logger.info("中文测试输出 🚀")
logger.success("上传文件成功 ✅")
logger.error("下载文件失败 ❌")

print("Test completed!")