Filter logs line based and in binary mode without decoding utf-8

(cherry picked from commit 4a49234afa)
This commit is contained in:
Alexander Graf
2024-10-17 15:26:32 +02:00
committed by Mergify
parent 7e41c04659
commit 5e8fdd4c9e
4 changed files with 29 additions and 27 deletions

View File

@@ -4,7 +4,9 @@ import os
import subprocess
from socrate import system
system.set_env(log_filters=r'could not be resolved \(\d\: [^\)]+\) while in resolving client address, client\: [^,]+, server: [^\:]+\:(25|110|143|587|465|993|995)$')
system.set_env(log_filters=[
rb'could not be resolved \(\d\: [^\)]+\) while in resolving client address, client\: [^,]+, server: [^\:]+\:(25|110|143|587|465|993|995)$'
])
# Check if a stale pid file exists
if os.path.exists("/var/run/nginx.pid"):