]> granicus.if.org Git - pgbadger/commitdiff
Fix additional message at end of query or error when it was logged from application...
authorDarold Gilles <gilles@darold.net>
Mon, 10 Mar 2014 15:46:37 +0000 (16:46 +0100)
committerDarold Gilles <gilles@darold.net>
Mon, 10 Mar 2014 15:46:37 +0000 (16:46 +0100)
pgbadger

index 562e4bd1be42592a649f1b031a471f19435931c9..d2644604929ae770280352b3ef26365fab276a7a 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -1690,6 +1690,9 @@ sub process_file
                                                next;
                                        } 
 
+                                       # Some log line may be written by applications
+                                       next if ($line =~ / LOG:  /);
+
                                        if (exists $cur_temp_info{$cur_pid}{query}) {
                                                $cur_temp_info{$cur_pid}{query} .= "\n" . $t_query;
                                        } elsif (exists $cur_lock_info{$cur_pid}{query}) {
@@ -1707,6 +1710,9 @@ sub process_file
                                # Collect orphaned lines of multiline queries
                                } elsif ($cur_pid && ($line !~ $orphan_syslog_line)) {
 
+                                       # Some log line may be written by applications
+                                       next if ($line =~ / LOG:  /);
+
                                        if (exists $cur_temp_info{$cur_pid}{query}) {
                                                $cur_temp_info{$cur_pid}{query} .= "\n" . $line;
                                        } elsif (exists $cur_lock_info{$cur_pid}{query}) {
@@ -1810,6 +1816,10 @@ sub process_file
                                                $cur_info{$cur_pid}{parameters} .= " $line";
                                                next;
                                        } 
+
+                                       # Some log line may be written by applications
+                                       next if ($line =~ / LOG:  /);
+
                                        if (exists $cur_temp_info{$cur_pid}{query}) {
                                                $cur_temp_info{$cur_pid}{query} .= "\n" . $line;
                                        } elsif (exists $cur_lock_info{$cur_pid}{query}) {