From 5da3406647ec74709d40d7b60fd0f06d9b4e3848 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 15 Aug 2023 07:12:43 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=97=A5=E5=BF=97=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E9=83=A8=E5=88=86=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/endpoints/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/endpoints/system.py b/app/api/endpoints/system.py index b5bf484e8..f722f37e3 100644 --- a/app/api/endpoints/system.py +++ b/app/api/endpoints/system.py @@ -112,8 +112,8 @@ def get_logging(token: str): def log_generator(): log_path = settings.LOG_PATH / 'moviepilot.log' texts = tailer.tail(open(log_path, 'r'), 50) + yield 'data: %s\n\n' % '\n'.join(texts) while True: - yield 'data: %s\n\n' % '\n'.join(texts) for text in tailer.follow(open(log_path, 'r')): yield 'data: %s\n\n' % (text or '') time.sleep(1)