aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2017-08-14 17:20:03 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2017-08-14 17:20:03 +0300
commit873f31b6952c16b734ecfa05d78550328035d4a3 (patch)
tree2b017ba2a9495a014ef26deaf7b78594fbdeedfc /utils
parent777efac652ed5c0be731bb161e8be99c44f8f8ca (diff)
downloadrspamd-873f31b6952c16b734ecfa05d78550328035d4a3.tar.gz
rspamd-873f31b6952c16b734ecfa05d78550328035d4a3.zip
[Minor] Fix log format detection
Diffstat (limited to 'utils')
-rwxr-xr-xutils/rspamd_stats.pl8
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";