]> granicus.if.org Git - pgbadger/commitdiff
Fix issue #46, to add support to hostname or ip address in the client detection....
authorDarold Gilles <gilles@darold.net>
Mon, 10 Dec 2012 08:51:54 +0000 (09:51 +0100)
committerDarold Gilles <gilles@darold.net>
Mon, 10 Dec 2012 08:51:54 +0000 (09:51 +0100)
pgbadger

index ce0b66f3df808547702f9867182e2cfd6688e1ce..caaf113829e773569c712bfd2529159f51570b7e 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -4316,8 +4316,8 @@ sub build_log_line_prefix_regex
                '%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
-               '%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
+               '%r' => [('t_hostport',     '([a-zA-Z0-9\-\.]+|\[local\]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?[\(\d\)]*')],     # remote host and port
+               '%h' => [('t_client',       '([a-zA-Z0-9\-\.]+|\[local\]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?')],              # remote host
                '%p' => [('t_pid',          '(\d+)')],                                                        # process ID
                '%t' => [('t_timestamp',    '(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})(?: [A-Z\d]{3,6})?')],      # timestamp without milliseconds
                '%m' => [('t_mtimestamp',   '(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\.\d+(?: [A-Z\d]{3,6})?')], # timestamp with milliseconds