]> granicus.if.org Git - pgbadger/commitdiff
Fix autodetect log format to handle with additional info like: [ID * local2.info...
authorDarold <gilles@darold.net>
Sun, 7 Oct 2012 20:44:33 +0000 (22:44 +0200)
committerDarold <gilles@darold.net>
Sun, 7 Oct 2012 20:44:33 +0000 (22:44 +0200)
pgbadger

index cf86551aa1f75eedebe74ec1518071d0ac850f53..89c760e61de517e12f5c393ff4f64a4aa348abd6 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -3678,7 +3678,7 @@ sub autodetect_format
                $nline++;
 
                # Is syslog lines ?
-               if ($line =~ /^[A-Z][a-z]{2}\s+\d+\s\d+:\d+:\d+\s[^\s]+\s([^\[]+)\[\d+\]:\s\[[0-9\-]+\](.*?)(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+$duration/) {
+               if ($line =~ /^[A-Z][a-z]{2}\s+\d+\s\d+:\d+:\d+\s[^\s]+\s([^\[]+)\[\d+\]:(.*?)\s\[[0-9\-]+\](.*?)(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):\s+$duration/) {
                        $fmt = 'syslog';
                        $nfound++;
                        $ident_name{$1}++;