🎨 增加实例化日志记录器导出,避免多实例问题

This commit is contained in:
Nanaloveyuki
2025-07-29 19:00:35 +08:00
parent da2231875f
commit b1918d1948

View File

@ -11,6 +11,8 @@ from .utils import fmt_console, fmt_placeholder, fmt_message, fmt_level_name
from .utils import set_style, set_color, set_bg_color from .utils import set_style, set_color, set_bg_color
from .levels import Logger from .levels import Logger
logger = Logger()
__all__ = [ __all__ = [
"get_config", "get_config",
"set_config", "set_config",
@ -27,5 +29,6 @@ __all__ = [
"set_color", "set_color",
"set_bg_color", "set_bg_color",
"create_backup", "create_backup",
"Logger" # 日志记录器非实例化 "Logger", # 日志记录器非实例化
"logger" # 日志记录器实例化
] ]