From: Darold Gilles Date: Mon, 15 Dec 2014 12:25:27 +0000 (+0100) Subject: Add more details about the CSV parser error. It now prints the line number and the... X-Git-Tag: v6.3~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=276e2332cf4f67504db7567f70076d36b5a9977e;p=pgbadger Add more details about the CSV parser error. It now prints the line number and the last parameter that generate the failure. This should allow to see the malformed log entry. --- diff --git a/pgbadger b/pgbadger index 458e9ed..ba4ba73 100755 --- a/pgbadger +++ b/pgbadger @@ -2053,7 +2053,8 @@ sub process_file } } if (!$getout) { - $csv->eof or warn "FATAL: cannot use CSV on $logfile, " . $csv->error_diag() . "\n"; + $csv->eof or warn "FATAL: cannot use CSV on $logfile, " . $csv->error_diag() . " at line " . ($nlines+1), "\n"; + print STDERR "DETAIL: " . $csv->error_input(), "\n"; } }