]> granicus.if.org Git - pgbadger/commitdiff
Fix multiline progress bar output.
authorDarold <gilles@darold.net>
Sat, 1 Dec 2012 10:28:33 +0000 (11:28 +0100)
committerDarold <gilles@darold.net>
Sat, 1 Dec 2012 10:28:33 +0000 (11:28 +0100)
pgbadger

index 03f17b84eb6df986fba7b4616fc1f990a13199de..99245cf3eed1d6504cd79287a5fc54319ecf9336 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -547,9 +547,9 @@ foreach my $logfile (@log_files) {
                        $nlines++;
                        if ($progress && (($nlines % $NUMPROGRESS) == 0)) {
                                if ($totalsize) {
-                                       print progress_bar($cursize, $totalsize, 25, '=');
+                                       print STDERR &progress_bar($cursize, $totalsize, 25, '=');
                                } else {
-                                       print ".";
+                                       print STDERR ".";
                                }
                        }
 
@@ -636,9 +636,9 @@ foreach my $logfile (@log_files) {
 
                        if ($progress && (($nlines % $NUMPROGRESS) == 0)) {
                                if ($totalsize) {
-                                       print progress_bar($cursize, $totalsize, 25, '=');
+                                       print STDERR &progress_bar($cursize, $totalsize, 25, '=');
                                } else {
-                                       print ".";
+                                       print STDERR ".";
                                }
                        }
 
@@ -831,7 +831,7 @@ foreach my $logfile (@log_files) {
 
        if ($progress) {
                if ($totalsize) {
-                       print progress_bar($cursize, $totalsize, 25, '=');
+                       print STDERR &progress_bar($cursize, $totalsize, 25, '=');
                }
                print STDERR "\n";
        }