]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix log format detection
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 14 Aug 2017 14:20:03 +0000 (17:20 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 14 Aug 2017 14:20:03 +0000 (17:20 +0300)
utils/rspamd_stats.pl

index 46ad3a652ba22698fb8ecb5ca7fc85e1136d493a..b51431c7a0e53a4036c26ade9e669c18dcac948d 100755 (executable)
@@ -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";