]> granicus.if.org Git - pgbadger/commitdiff
Fix false cur_date when using syslog and allow -b and -e options to work.
authorVincent Picavet <vincent.picavet@oslandia.com>
Thu, 31 May 2012 17:18:40 +0000 (17:18 +0000)
committerVincent Picavet <vincent.picavet@oslandia.com>
Thu, 31 May 2012 17:18:40 +0000 (17:18 +0000)
pgbadger

index c72fa073c812eb706bf317a775b95e4f11417137..1b3e46b7916e9aaa9559281844193b5f7b7a7ad5 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -337,7 +337,7 @@ while (my $line = <$lfile>) {
                                $tmp_year = substr($CURRENT_DATE,1, 4) - 1;
                        }
                        # Skip unwanted lines
-                       my $cur_date = "$tmp_year$1$2$3$4$5";
+                       my $cur_date = "$tmp_year$month_abbr{$1}$2$3$4$5";
                        next if ($from && ($from > $cur_date));
                        last if ($to && ($to < $cur_date));
                        # Process the log line