From 831a4536d09e693c92ef049d9811c539fc44569e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 13 Mar 2018 12:56:05 +0000 Subject: [PATCH] [Minor] Allow an alternative syslog format --- utils/rspamd_stats.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl index 1f075b9bb..8f2cc60e8 100755 --- a/utils/rspamd_stats.pl +++ b/utils/rspamd_stats.pl @@ -564,6 +564,12 @@ sub log_time_format { last; } + # Aug 8 00:02:50 hostname rspamd[66986] + elsif (/^\w{3} (?:\s?\d|\d\d) \d\d:\d\d:\d\d \S+ rspamd\[\d+\]/) { + $format = 'syslog'; + last; + } + # Skip newsyslog messages # Aug 8 00:00:00 hostname newsyslog[63284]: logfile turned over elsif ( /^\w{3} (?:\s?\d|\d\d) \d\d:\d\d:\d\d\ \S+ newsyslog\[\d+\]: logfile turned over$/ ) { -- 2.39.5