From: Darold Date: Thu, 24 May 2012 03:53:32 +0000 (+0200) Subject: fix interpreted ctrl+M and log format example from previous git merges X-Git-Tag: v3.2~239 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc7f88a2a1a56a07ba5e990220e0edb900579d93;p=pgbadger fix interpreted ctrl+M and log format example from previous git merges --- diff --git a/pgbadger b/pgbadger index 56b1d4e..574cc75 100755 --- a/pgbadger +++ b/pgbadger @@ -10,8 +10,6 @@ # # You must enable SQL query logging : log_min_duration_statement = 0 # 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 ' # @@ -304,8 +302,7 @@ my $cur_td = $t0; while (my $line = <$lfile>) { $cursize += length($line); chomp($line); - $line =~ s/ -//; + $line =~ s/ //; $nlines++; next if (!$line); @@ -2195,8 +2192,7 @@ sub autodetect_format } while (my $line = <$tfile>) { chomp($line); - $line =~ s/ -//; + $line =~ s/ //; next if (!$line); $nline++; # Is syslog lines ?