Browse Source

[Minor] Fix log format detection

tags/1.7.0
Alexander Moisseev 6 years ago
parent
commit
873f31b695
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      utils/rspamd_stats.pl

+ 5
- 3
utils/rspamd_stats.pl View File

@@ -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";

Loading…
Cancel
Save