From ec8fbf9b7810c87abb0c373f9e95b7a2460b1f33 Mon Sep 17 00:00:00 2001 From: Tyler Gu Date: Wed, 15 Nov 2023 17:18:43 -0600 Subject: [PATCH] Fix Signed-off-by: Tyler Gu --- acto/parse_log/parse_log.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/acto/parse_log/parse_log.py b/acto/parse_log/parse_log.py index 5baac7ab43..5369d33e7a 100644 --- a/acto/parse_log/parse_log.py +++ b/acto/parse_log/parse_log.py @@ -98,8 +98,12 @@ def parse_log(line: str) -> dict: del log_line['severity'] log_line['level'] = log_line['level'].lower() except Exception as e: - logger.debug(f"parse_log() cannot parse line {line} due to {e}") - pass + if 'error' in line.lower(): + log_line['level'] = 'error' + log_line['msg'] = line + else: + logger.debug(f"parse_log() cannot parse line {line} due to {e}") + pass return log_line