[nem-en] colors

Alexey Borzenkov snaury at gmail.com
Fri Jun 29 22:11:47 CEST 2007


On 6/29/07, Kamil Dworakowski <kamil.dworakowski at googlemail.com> wrote:
> ncc is supposed to color the error and warning messages, but I have
> never seen
> that. Instead I see junk around error word (cygwin). I know that it can be
> disabled, but is there a way to make those colors actually appear?
>
> ...ttern.n:22:5:67:5:  [01;31merror [0m: unimplemented interface method...

I think it's possible using System.Console.ForegroundColor and
System.Console.ResetColor(). Then one could rework Message.report to
get header with desired color and m separately, then colorize it if
colors are enabled and output is tty. The only problem is that I don't
know how to determine if System.Console.Out is tty or not. :-/

Best regards,
Alexey.



More information about the devel-en mailing list