From a81c990e45ced93fa561403567e502c1cf731e8f Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 18 Jun 2024 06:49:46 -0600 Subject: [PATCH] Fix case where S6 timestamp is missing --- 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 787a087844..139b10d5b6 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)