1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2026-03-15 08:13:16 +08:00

refactor: 优化日志

This commit is contained in:
涵曦
2026-01-06 09:34:35 +08:00
parent c3eff09dfb
commit 7c29769ccc

View File

@@ -18,7 +18,7 @@ def load_year_data(year):
file_path = f"holiday/{year}.json"
if not os.path.exists(file_path):
log.warn(f"未找到 {file_path} 文件。")
log.warning(f"未找到 {file_path} 文件。")
return False
try:
@@ -55,7 +55,7 @@ def is_off_day(year, month, day):
"""判断是否为休息日(包括法定节假日和周末)"""
# 检查日期有效性
if not is_valid_date(year, month, day):
log.warn(f"无效日期: {year}-{month:02d}-{day:02d}")
log.warning(f"无效日期: {year}-{month:02d}-{day:02d}")
return None
# 加载年份数据