From: Isaac Reuben Date: Sat, 19 May 2012 04:00:27 +0000 (-0700) Subject: Fix config examples to use variables for user and db X-Git-Tag: v3.2~241^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=195ef4b4c9a375528bc0939429ef2ccd795109c5;p=pgbadger Fix config examples to use variables for user and db --- diff --git a/README b/README index 35161da..c2832cb 100755 --- a/README +++ b/README @@ -19,19 +19,19 @@ With 'stderr' log format, log line prefix must be at least: Log line prefix could add user and database name as follow: - log_line_prefix = '%t [%p]: [%l-1] user=username,db=dbname ' + log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' or for syslog log file format: - log_line_prefix = 'user=username,db=dbname ' + log_line_prefix = 'user=%u,db=%d ' Log line prefix for stderr output could also be: - log_line_prefix = '%t [%p]: [%l-1] db=dbname,user=username' + log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u ' or for syslog output: - log_line_prefix = 'db=dbname,user=username' + log_line_prefix = 'db=%d,user=%u ' Additional informations that could be collected need logging activation into postgresql.conf: diff --git a/pgbadger b/pgbadger index 9fc96a5..a60b466 100755 --- a/pgbadger +++ b/pgbadger @@ -12,6 +12,8 @@ # Log line prefix should be : log_line_prefix = '%t [%p]: [%l-1] ' # Log line prefix should be : log_line_prefix = '%t [%p]: [%l-1] user=username,db=dbname' # Log line prefix should be : log_line_prefix = '%t [%p]: [%l-1] db=dbname,user=username' +# Log line prefix should be : log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' +# Log line prefix should be : log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u ' # # Additional informations that could be collected and reported #