2 # logger.pl: masks long meaningless output with pretty lines of dots
3 # Details: 1) reads lines from STDIN and echos them on STDOUT,
4 # 2) print a '.' to STDERR every $N lines.
5 # 3) print a newline after a sequence of $C dots
10 # make sure all output gets displayed immediately
13 # TODO: add -n and -c options w/ zero checks)
14 # line and column limits
18 # current line and column counters
22 # read all lines from STDIN
27 # echo line to console if it is important
28 if (/(Warning|Error)/) {
29 print STDERR
"\n" if $c;
33 # only display progress every Nth step
36 # wrap at column C to provide fixed-width rows of dots
37 print STDERR
"\n" unless ++$c % $C;
40 print STDERR
"\n" if $c;