darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.57k stars 351 forks source link

Milliseconds in syslog timestamp #793

Closed elpavel closed 1 year ago

elpavel commented 1 year ago

Records don't get processed when the syslog timestamp contains milliseconds.

This is a sample log line in TEST.log:

Sep 13 20:00:04.501399 myhost001 devtest[1]: [1-1] time=2023-09-13 20:00:04.487 UTC,pid=2165900,user=admin,db=testdb,client=192.168.13.13(37742),appname=testapp,vid=267/4051215,xid=0 LOG:  statement: SELECT some_function()

and pgbadger is called as:

perl ./pgbadger -f syslog --prefix time=%m,pid=%p,user=%u,db=%d,client=%r,appname=%a,vid=%v,xid=%x  --ident devtest --log-duration  --anonymize -j 6 -o pgbadger.html TEST.log
darold commented 1 year ago

Commit 28f21eb fixes this issue.