X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=tools%2Flogger.pl;h=fb38f067d7d1f0ec36ee1a78936759d37cf92318;hb=8a41656391bd8eb6854c8573920d1155d815966b;hp=1ec5441ad5c964678f547ce790de0f14a47c7f83;hpb=e666807a6ffc592be03dddb90ad2d40f2011c8d6;p=openocd.git diff --git a/tools/logger.pl b/tools/logger.pl index 1ec5441ad5..fb38f067d7 100644 --- a/tools/logger.pl +++ b/tools/logger.pl @@ -24,11 +24,17 @@ while () { # echo line to output print STDOUT $_; + # echo line to console if it is important + if (/(Warning|Error)/) { + print STDERR "\n" if $c; + print STDERR $_; + $c = 0; + } # only display progress every Nth step - next unless ++$n % $N; + next if ++$n % $N; print STDERR "."; # wrap at column C to provide fixed-width rows of dots print STDERR "\n" unless ++$c % $C; } -print STDERR "\n" +print STDERR "\n" if $c;