]> granicus.if.org Git - pgbadger/commitdiff
Allow use of Perl metacharacters like [..] in application name. Thanks to Magnus...
authorDarold Gilles <gilles@darold.net>
Wed, 12 Mar 2014 11:30:56 +0000 (12:30 +0100)
committerDarold Gilles <gilles@darold.net>
Wed, 12 Mar 2014 11:30:56 +0000 (12:30 +0100)
pgbadger

index 9cb410a3868c7c740baf43509516f471605b3769..bb116613f07a340e188676c0f77a49653efb9803 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -7905,7 +7905,7 @@ sub validate_log_line
        if ($#dbappname >= 0) {
 
                # Log line does not match the required dbname
-               if (!$prefix_vars{'t_appname'} || !grep(/^$prefix_vars{'t_appname'}$/i, @dbappname)) {
+               if (!$prefix_vars{'t_appname'} || !grep(/^\Q$prefix_vars{'t_appname'}\E$/i, @dbappname)) {
                        return 0;
                }
        }
@@ -7919,7 +7919,7 @@ sub validate_log_line
        if ($#exclude_appname >= 0) {
 
                # Log line matches the excluded appname
-               if ($prefix_vars{'t_appname'} && grep(/^$prefix_vars{'t_appname'}$/i, @exclude_appname)) {
+               if ($prefix_vars{'t_appname'} && grep(/^\Q$prefix_vars{'t_appname'}\E$/i, @exclude_appname)) {
                        return 0;
                }
        }