]> granicus.if.org Git - pgbadger/commitdiff
Add more details about the CSV parser error. It now prints the line number and the...
authorDarold Gilles <gilles@darold.net>
Mon, 15 Dec 2014 12:25:27 +0000 (13:25 +0100)
committerDarold Gilles <gilles@darold.net>
Mon, 15 Dec 2014 12:25:27 +0000 (13:25 +0100)
pgbadger

index 458e9ed151ce6171d69b32c2c1fce0bad433a769..ba4ba73a9817888f87084cfade2b4a49d0752577 100755 (executable)
--- 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";
                }
 
        }