From: Darold Gilles Date: Mon, 10 Dec 2012 08:51:54 +0000 (+0100) Subject: Fix issue #46, to add support to hostname or ip address in the client detection.... X-Git-Tag: v3.2~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=139e89662db0d4e6bf37cf6c23658f70ad98e063;p=pgbadger Fix issue #46, to add support to hostname or ip address in the client detection. Thanks to stuntmunkee for the report. --- diff --git a/pgbadger b/pgbadger index ce0b66f..caaf113 100755 --- 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