调整log目录

This commit is contained in:
liuwei
2026-01-16 13:22:27 +08:00
parent f73c730fb4
commit a987902f72
2 changed files with 4 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ from utils.sehuatang.sehuatang_bot import SehuatangCrawler
# INFO 日志(包含 INFO、DEBUG但不包含 WARNING、ERROR
logger.add(
f"wx_info.log",
f"logs/wx_info.log",
level="INFO",
filter=lambda record: record["level"].name in ["INFO", "DEBUG"],
rotation="10 MB",
@@ -25,7 +25,7 @@ logger.add(
# ERROR 日志(仅 ERROR 及以上)
logger.add(
f"wx_error.log",
f"logs/wx_error.log",
level="ERROR",
rotation="10 MB",
retention="7 days",
@@ -33,7 +33,7 @@ logger.add(
)
# ERROR 日志(仅 ERROR 及以上)
logger.add(
f"wx_debug.log",
f"logs/wx_debug.log",
level="DEBUG",
rotation="10 MB",
retention="7 days",