]> granicus.if.org Git - pgbadger/commitdiff
Allow usage of a dash into database, user and application names when prefix is used...
authorDarold Gilles <gilles@darold.net>
Thu, 22 Nov 2012 16:24:00 +0000 (17:24 +0100)
committerDarold Gilles <gilles@darold.net>
Thu, 22 Nov 2012 16:24:00 +0000 (17:24 +0100)
pgbadger

index 6d920539a0585b861bba222400a1856998e2aed9..03f17b84eb6df986fba7b4616fc1f990a13199de 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -4308,8 +4308,8 @@ sub build_log_line_prefix_regex
 {
        my %regex_map = (
                '%a' => [('t_appname',      '([0-9a-zA-Z\.\-\_\/\[\]]*)')],                                   # application name
-               '%u' => [('t_dbuser',       '([0-9a-zA-Z\_\[\]]*)')],                                         # user name
-               '%d' => [('t_dbname',       '([0-9a-zA-Z\_\[\]]*)')],                                         # database name
+               '%u' => [('t_dbuser',       '([0-9a-zA-Z\_\[\]\-]*)')],                                         # user name
+               '%d' => [('t_dbname',       '([0-9a-zA-Z\_\[\]\-]*)')],                                         # database name
                '%r' => [('t_hostport',     '(\[local\]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?[\(\d\)]*')],     # remote host and port
                '%h' => [('t_client',       '(\[local\]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?')],              # remote host
                '%p' => [('t_pid',          '(\d+)')],                                                        # process ID