微信小程序页面迁移校验之前 P5任务处理之前

This commit is contained in:
Neo
2026-03-09 01:19:21 +08:00
parent 263bf96035
commit 6e20987d2f
1112 changed files with 153824 additions and 219694 deletions

View File

@@ -0,0 +1,20 @@
"""查看最新 ETL 日志的最后 50 行"""
import os
from pathlib import Path
from dotenv import load_dotenv
load_dotenv(Path(__file__).resolve().parents[2] / ".env")
log_root = Path(os.environ["LOG_ROOT"])
logs = sorted(log_root.glob("*.log"), key=lambda p: p.stat().st_mtime, reverse=True)
if not logs:
print("无日志文件")
else:
latest = logs[0]
print(f"最新日志: {latest.name} ({latest.stat().st_size} bytes)")
print(f"修改时间: {latest.stat().st_mtime}")
lines = latest.read_text(encoding="utf-8", errors="replace").splitlines()
print(f"总行数: {len(lines)}")
print(f"\n--- 最后 60 行 ---")
for line in lines[-60:]:
print(line)