<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><blockquote type="cite"><div>There are some little bugs with this combination, which I had no time<br>to investigate. E.g. after an error log message, the whole output<br>changes its color saturation.</div></blockquote><div><br></div>That sounds suspiciously like someone forgot to reset the terminal code back to normal from red.<div><br></div><div>Here's what we use in our encoder:</div><div><br></div><div><div><font class="Apple-style-span" face="'Courier New'"> // Attribute codes:</font></div><div><font class="Apple-style-span" face="'Courier New'"> // 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed</font></div><div><font class="Apple-style-span" face="'Courier New'"> //</font></div><div><font class="Apple-style-span" face="'Courier New'"> // Text color codes:</font></div><div><font class="Apple-style-span" face="'Courier New'"> // 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_YELLOW = "\033[1;33m";</font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_NEUTRAL = "\033[0m";</font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_ALL = "\033[0m";</font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_ERROR = "\033[01;31m";</font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_WARN = "\033[01;35m";</font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_INFO = "\033[01;34m";</font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_DEBUG = "\033[01;36m";</font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_TRACE = "\033[0;37m";</font></div><div><font class="Apple-style-span" face="'Courier New'"> public static final String COLOR_DEFAULT = "\033[0m";</font></div><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br>After every log statement, we have to append COLOR_DEFAULT to change it back to normal (we color our entire log message the same color).</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">--adam<br><br><a href="http://gordonizer.com">http://gordonizer.com</a><br><br></div>
</div>
<br><div><div>On Jun 7, 2012, at 8:50 AM, Lars Fischer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello Ceki,<br><br>2012/6/7 ceki <<a href="mailto:ceki@qos.ch">ceki@qos.ch</a>>:<br><blockquote type="cite"><br></blockquote><blockquote type="cite">Has anyone had a chance to try ANSI coloring [1] as introduced in<br></blockquote><blockquote type="cite">logback 1.0.5? It's a seemingly cool feature but I am curious whether<br></blockquote><blockquote type="cite">it's actually useful.<br></blockquote><br>I actually started using it for logging during development.<br>But my ide (eclipse) does not support taking notice of the ANSI colors.<br><br>So I had to use an additional eclipse extension:<br><a href="http://www.mihai-nita.net/eclipse/">http://www.mihai-nita.net/eclipse/</a><br><br>There are some little bugs with this combination, which I had no time<br>to investigate. E.g. after an error log message, the whole output<br>changes its color saturation.<br><br>But at the moment I find it useful.<br><br>Regards,<br>Lars<br>_______________________________________________<br>Logback-user mailing list<br>Logback-user@qos.ch<br>http://mailman.qos.ch/mailman/listinfo/logback-user<br></div></blockquote></div><br></div></body></html>