]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] rspamd_stats: skip journalctl header 2200/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 27 Apr 2018 06:57:14 +0000 (09:57 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 27 Apr 2018 06:57:14 +0000 (09:57 +0300)
utils/rspamd_stats.pl

index 00f08ade8a0d35ab3ca7f07ecbb711030950c1be..f4f01dd8519eeb1fb473e763ac630c8824960d6d 100755 (executable)
@@ -723,6 +723,11 @@ sub log_time_format {
     elsif ( /^\w{3} (?:\s?\d|\d\d) \d\d:\d\d:\d\d\ \S+ newsyslog\[\d+\]: logfile turned over$/ ) {
       next;
     }
+    # Skip journalctl messages
+    # -- Logs begin at Mon 2018-01-15 11:16:24 MSK, end at Fri 2018-04-27 09:10:30 MSK. --
+    elsif ( /^-- Logs begin at \w{3} \d{4}-\d\d-\d\d \d\d:\d\d:\d\d [A-Z]{3}, end at \w{3} \d{4}-\d\d-\d\d \d\d:\d\d:\d\d [A-Z]{3}\. --$/ ) {
+      next;
+    }
     else {
       print "Unknown log format\n";
       exit 1;