From a101084194d78b3a6ca497a7074daddcb09462f8 Mon Sep 17 00:00:00 2001 From: weixin_46229132 Date: Sun, 27 Apr 2025 15:02:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E6=88=90=E8=BE=93=E5=87=BA=E6=9C=80?= =?UTF-8?q?=E5=90=8E50=E8=A1=8C=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/odm_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/odm_monitor.py b/utils/odm_monitor.py index a917828..8e420e0 100644 --- a/utils/odm_monitor.py +++ b/utils/odm_monitor.py @@ -87,8 +87,8 @@ class ODMProcessMonitor: # 获取容器的错误日志 error_msg = container.logs( stderr=True).decode("utf-8").splitlines() - self.logger.error("容器运行失败的详细错误日志:") - for line in error_msg: + self.logger.error("容器运行失败的最后 50 行错误日志:") + for line in error_msg[-50:]: self.logger.error(line) container.remove() time.sleep(5)