]> granicus.if.org Git - pgbadger/commitdiff
Fix bug in %r = remote host and port log line prefix detection. Thanks to Hubert...
authorDarold Gilles <gilles@darold.net>
Thu, 18 Oct 2012 21:24:04 +0000 (23:24 +0200)
committerDarold Gilles <gilles@darold.net>
Thu, 18 Oct 2012 21:24:04 +0000 (23:24 +0200)
pgbadger

index 2aae67241fa9bdaa493d996f650c879be0e88cc6..a3d6dfb98052923a3a756f29229df562b9045ae9 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -4052,7 +4052,7 @@ 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
+               '%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
                '%t' => [ ('t_timestamp', '(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) [A-Z\d]{3,6}') ], # timestamp without milliseconds