diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2017-08-14 17:20:03 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2017-08-14 17:20:03 +0300 |
commit | 873f31b6952c16b734ecfa05d78550328035d4a3 (patch) | |
tree | 2b017ba2a9495a014ef26deaf7b78594fbdeedfc /utils | |
parent | 777efac652ed5c0be731bb161e8be99c44f8f8ca (diff) | |
download | rspamd-873f31b6952c16b734ecfa05d78550328035d4a3.tar.gz rspamd-873f31b6952c16b734ecfa05d78550328035d4a3.zip |
[Minor] Fix log format detection
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/rspamd_stats.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl index 46ad3a652..b51431c7a 100755 --- a/utils/rspamd_stats.pl +++ b/utils/rspamd_stats.pl @@ -552,9 +552,11 @@ sub log_time_format { $format = 'syslog'; last; } - elsif (/^\w{3} (?:\s?\d|\d\d) \d\d:\d\d:\d\d\s/) { - $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$/ ) { + next; } else { print "Unknown log format\n"; |