Skip to content

Commit 856f0f8

Browse files
committed
fix: add universal ignore for specific squid error entries in log parsing
1 parent 708ba08 commit 856f0f8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

parsers/log.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,19 @@ def get_file_inode(filepath):
110110

111111

112112
def parse_log_line(line):
113+
# Universal ignore for specific squid error entries (apply regardless of LOG_FORMAT)
114+
try:
115+
line_lower = line.lower() if isinstance(line, str) else ""
116+
if "error:transaction-end-before-headers" in line_lower:
117+
return None
118+
except Exception:
119+
pass
120+
113121
if LOG_FORMAT == "DEFAULT":
114122
return parse_log_line_default(line)
115123

116124
# DETAILED (current behavior)
117-
if (
118-
"cache_object://" in line
119-
or "error:transaction-end-before-headers" in line.lower()
120-
):
125+
if "cache_object://" in line:
121126
return None
122127
if "|" in line:
123128
return parse_log_line_pipe_format(line)

0 commit comments

Comments
 (0)