From bdda89b5e2aa89912eb4c014e415d0eb10e4bd42 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 18 Jun 2024 07:07:28 -0600 Subject: [PATCH] Fix case where S6 timestamp is missing (#12040) --- frigate/api/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frigate/api/app.py b/frigate/api/app.py index 787a08784..139b10d5b 100644 --- a/frigate/api/app.py +++ b/frigate/api/app.py @@ -481,9 +481,13 @@ def logs(service: str): for rawLine in contents.splitlines(): cleanLine = rawLine.strip() - if len(cleanLine) < 10 or " " not in cleanLine: + if len(cleanLine) < 10: continue + # handle cases where S6 does not include date in log line + if " " not in cleanLine: + cleanLine = f"{datetime.now()} {cleanLine}" + if dateEnd == 0: dateEnd = cleanLine.index(" ") keyLength = dateEnd - (6 if service_location == "frigate" else 0)