From: zwelch Date: Wed, 3 Jun 2009 02:56:20 +0000 (+0000) Subject: Improve logger script to expose warnings and errors in the output. X-Git-Tag: v0.2.0~487 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=58c19285e219666f47967d4da6587d2cca96416d Improve logger script to expose warnings and errors in the output. git-svn-id: svn://svn.berlios.de/openocd/trunk@2023 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- diff --git a/tools/logger.pl b/tools/logger.pl index 1ec5441ad5..3256bdcf70 100644 --- a/tools/logger.pl +++ b/tools/logger.pl @@ -24,8 +24,14 @@ 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;