Files
zulip/tools/munge_postgres_logs.pl
Zev Benjamin c2ca608b05 Add tool to convert our Postgres log lines into the format expected by pgFouine
(imported from commit 824c2b46c0296ae43464784767f8dbb7ffbd8acb)
2013-01-28 16:24:32 -05:00

12 lines
223 B
Perl

#!/usr/bin/perl
use strict;
use warnings;
while (<>) {
# remove milliseconds
s/(?<= \d\d:\d\d:\d\d)\.\d{3}//;
# convert session id to process id
s/\[[0-9a-zA-Z]+\.([0-9a-zA-Z]+)\]/"[" . hex($1) . "]"/e;
print;
}