From: Darold Gilles Date: Thu, 18 Oct 2012 21:24:04 +0000 (+0200) Subject: Fix bug in %r = remote host and port log line prefix detection. Thanks to Hubert... X-Git-Tag: v3.2~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04b0b286b9832b12c045ec217fa4bd3c1f44d060;p=pgbadger Fix bug in %r = remote host and port log line prefix detection. Thanks to Hubert Depesz Lubaczewski for the report. --- diff --git a/pgbadger b/pgbadger index 2aae672..a3d6dfb 100755 --- 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