From f69f1c371a3e9c6a6318a5675fb1efb10a63ca5c Mon Sep 17 00:00:00 2001 From: hmo Date: Fri, 14 Aug 2026 11:21:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20generate=5Freport=E7=AE=80=E6=8A=A5?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=BB=9F=E4=B8=80=E6=97=A5=E5=BF=97(daily=5F?= =?UTF-8?q?brief.log)=E2=80=94=E2=80=94=E5=BC=80=E7=9B=98/=E6=94=B6?= =?UTF-8?q?=E7=9B=98=E7=AE=80=E6=8A=A5=E5=86=85=E5=AE=B9=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=B0gateway/logs/daily=5Fbrief.log,=E6=96=B9=E4=BE=BF?= =?UTF-8?q?=E6=BA=AF=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/generate_report.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deploy/profile-scripts/generate_report.py b/deploy/profile-scripts/generate_report.py index 63e68b3a..b336fae6 100644 --- a/deploy/profile-scripts/generate_report.py +++ b/deploy/profile-scripts/generate_report.py @@ -151,5 +151,18 @@ def main(): } print(json.dumps(param_table, ensure_ascii=False, indent=2)) + # 2026-08-14 通道统一:简报内容记录到统一日志(daily_brief.log),方便溯源 + try: + from datetime import datetime as _dt + _log_dir = Path("/home/hmo/MoFin/gateway/logs") + _log_dir.mkdir(parents=True, exist_ok=True) + _brief_log = _log_dir / "daily_brief.log" + with open(_brief_log, "a", encoding="utf-8") as _f: + _f.write(f"\n=== {_dt.now().strftime('%Y-%m-%d %H:%M:%S')} {report_type} ===\n") + _f.write(filled) + _f.write("\n") + except Exception: + pass + if __name__ == "__main__": main()