]> granicus.if.org Git - pgbadger/commitdiff
Fix reporting period to starts after the last --last-parsed value instead of the...
authorDarold Gilles <gilles@darold.net>
Tue, 3 Sep 2013 13:08:26 +0000 (15:08 +0200)
committerDarold Gilles <gilles@darold.net>
Tue, 3 Sep 2013 13:08:26 +0000 (15:08 +0200)
pgbadger

index 174e700f40ccd18e99a5fb120c8486cee3bd1e32..0bef7213809ba8a5ff98b447271671a0e7e9f489 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -1146,12 +1146,12 @@ sub process_file
                                last;
                        }
 
-                       # Store the current timestamp of the log line
-                       &store_current_timestamp($prefix_vars{'t_timestamp'});
-
                        # Jump to the last line parsed if required
                        next if (!&check_incremental_position($prefix_vars{'t_timestamp'}, join(',', @$row)));
 
+                       # Store the current timestamp of the log line
+                       &store_current_timestamp($prefix_vars{'t_timestamp'});
+
                        # Set query parameters as global variables
                        $prefix_vars{'t_dbuser'}  = $row->[1] || '';
                        $prefix_vars{'t_dbname'}  = $row->[2] || '';
@@ -1275,14 +1275,14 @@ sub process_file
                                                last;
                                        }
 
-                                       # Store the current timestamp of the log line
-                                       &store_current_timestamp($prefix_vars{'t_timestamp'});
-
                                        # Jump to the last line parsed if required
                                        next if (!&check_incremental_position($prefix_vars{'t_timestamp'}, $line));
                                        $cur_pid = $prefix_vars{'t_pid'};
                                        $goon = 1;
 
+                                       # Store the current timestamp of the log line
+                                       &store_current_timestamp($prefix_vars{'t_timestamp'});
+
                                        # Extract information from log line prefix
                                        if (!$log_line_prefix) {
                                                &parse_log_prefix($prefix_vars{'t_logprefix'});
@@ -1380,13 +1380,13 @@ sub process_file
                                                last;
                                        }
 
-                                       # Store the current timestamp of the log line
-                                       &store_current_timestamp($prefix_vars{'t_timestamp'});
-
                                        # Jump to the last line parsed if required
                                        next if (!&check_incremental_position($prefix_vars{'t_timestamp'}, $line));
                                        $cur_pid = $prefix_vars{'t_pid'};
 
+                                       # Store the current timestamp of the log line
+                                       &store_current_timestamp($prefix_vars{'t_timestamp'});
+
                                        # Extract information from log line prefix
                                        if (!$log_line_prefix) {
                                                &parse_log_prefix($prefix_vars{'t_logprefix'});