PostgreSQL log prefix for pgbadger

424 Views Asked by At

Im trying to parse a PostgreSQL log file with pgbadger. Its a custom log prefix. But when I try to parse its always showing queryes=0.

sample log:

'2020-03-07T16:09:43Z UTC [ db=dev user=rdsdb pid=16929 userid=1 xid=7382 ]' LOG: SELECT 1
'2020-03-07T16:09:43Z UTC [ db=dev user=rdsdb pid=16929 userid=1 xid=7383 ]' LOG: SET statement_timeout TO 120000

Pgbadger log:

/usr/local/bin/pgbadger -v pglog --prefix "'%t [ db=%d user=%u pid=%p userid=%p xid=%x ]'"

DEBUG: timezone not specified, using 0 seconds
DEBUG: Output 'html' reports will be written to out.html
DEBUG: Autodetected log format 'stderr' from pglog
DEBUG: pgBadger will use log format stderr to parse pglog.
DEBUG: Starting progressbar writer process
DEBUG: Processing log file: pglog
DEBUG: Starting reading file pglog...0 bytes of 205 (0.00%), queries: 0, events: 0
DEBUG: Start parsing postgresql log at offset 0 of file pglog to 205
DEBUG: the log statistics gathering took: 2 wallclock secs ( 0.00 usr +  0.01 sys =  0.01 CPU)

DEBUG: Output 'html' reports will be written to out.html
LOG: Ok, generating html report...
DEBUG: building reports took:  0 wallclock secs ( 0.01 usr +  0.00 sys =  0.01 CPU)
DEBUG: the total execution time took:  2 wallclock secs ( 0.01 usr +  0.01 sys =  0.02 CPU)
0

There are 0 best solutions below