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__archive__
parent
b344ea9b97
commit
58c19285e2
|
@ -24,8 +24,14 @@ while (<STDIN>)
|
||||||
{
|
{
|
||||||
# echo line to output
|
# echo line to output
|
||||||
print STDOUT $_;
|
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
|
# only display progress every Nth step
|
||||||
next unless ++$n % $N;
|
next if ++$n % $N;
|
||||||
print STDERR ".";
|
print STDERR ".";
|
||||||
# wrap at column C to provide fixed-width rows of dots
|
# wrap at column C to provide fixed-width rows of dots
|
||||||
print STDERR "\n" unless ++$c % $C;
|
print STDERR "\n" unless ++$c % $C;
|
||||||
|
|
Loading…
Reference in New Issue