]> granicus.if.org Git - pgbadger/commitdiff
Fix miss handling of multi lines queries on syslog
authorDarold Gilles <gilles@darold.net>
Thu, 5 Jul 2012 19:47:09 +0000 (21:47 +0200)
committerDarold Gilles <gilles@darold.net>
Thu, 5 Jul 2012 19:47:09 +0000 (21:47 +0200)
pgbadger

index d81221b7822574448deb78f9cef5e4674cbf3509..ad0199379668f5def116deaea46bf08c65958143 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -416,7 +416,7 @@ foreach $logfile (@log_files) {
                                $tmp_query =~ s/#011/\t/g;
                                # Process the log line
                                &parse_query($tmp_year, $month_abbr{$1}, $day, $3, $4, $5, $6, $8, $9, $10, $11, $tmp_query);
-                       } elsif ($line =~ /^(...)\s+(\d+)\s(\d+):(\d+):(\d+)\s([^\s]+)\s([^\[]+)\[(\d+)\]:\s\[([0-9\-]+)\]\s+[^\#]*(#011)[\t\s]*(.*)/) {
+                       } elsif ($line =~ /^(...)\s+(\d+)\s(\d+):(\d+):(\d+)\s([^\s]+)\s([^\[]+)\[(\d+)\]:\s\[([0-9\-]+)\]\s+(.*)/) {
                                my $tmp_query = $11;
                                $tmp_query =~ s/#011/\t/g;
                                $cur_info{query} .= "\n" . $tmp_query;