diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-03 02:56:20 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-03 02:56:20 +0000 |
commit | 58c19285e219666f47967d4da6587d2cca96416d (patch) | |
tree | 41e43a0f6aa0c364009e322f9a04811d72d047b1 | |
parent | b344ea9b97b52ea99227ece0eed9a3ece5516c7c (diff) | |
download | openocd+libswd-58c19285e219666f47967d4da6587d2cca96416d.tar.gz openocd+libswd-58c19285e219666f47967d4da6587d2cca96416d.tar.bz2 openocd+libswd-58c19285e219666f47967d4da6587d2cca96416d.tar.xz openocd+libswd-58c19285e219666f47967d4da6587d2cca96416d.zip |
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
-rw-r--r-- | tools/logger.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/logger.pl b/tools/logger.pl index 1ec5441a..3256bdcf 100644 --- a/tools/logger.pl +++ b/tools/logger.pl @@ -24,8 +24,14 @@ while (<STDIN>) { # 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; |