]> granicus.if.org Git - pgbadger/commitdiff
Small fix for issue with --dbclient and %h in log_line_prefix
authorJulien Rouhaud <julien.rouhaud@free.fr>
Wed, 5 Dec 2012 17:31:18 +0000 (18:31 +0100)
committerJulien Rouhaud <julien.rouhaud@free.fr>
Wed, 5 Dec 2012 17:31:18 +0000 (18:31 +0100)
pgbadger

index 99245cf3eed1d6504cd79287a5fc54319ecf9336..ca7f9bb54df3c5b29f8077dead603cba766e1dbf 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -123,7 +123,7 @@ $num_sep = ' ' if ($n =~ /,/);
 my $result = GetOptions(
        "a|average=i"              => \$avg_minutes,
        "b|begin=s"                => \$from,
-       "c|client=s"               => \@dbclient,
+       "c|dbclient=s"               => \@dbclient,
        "C|nocomment!"             => \$remove_comment,
        "d|dbname=s"               => \@dbname,
        "e|end=s"                  => \$to,
@@ -3388,7 +3388,7 @@ sub validate_log_line
 
                # Log line do not match the required dbclient
                $prefix_vars{'t_client'} ||= $prefix_vars{'t_hostport'};
-               if (!$prefix_vars{'t_client'} || !grep(/^$prefix_vars{'t_dbclient'}$/i, @dbclient)) {
+               if (!$prefix_vars{'t_client'} || !grep(/^$prefix_vars{'t_client'}$/i, @dbclient)) {
                        delete $cur_info{$t_pid};
                        return 0;
                }