logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingo Thon <ist...@gmx.de>
Subject Colorized output with ConsoleAppender
Date Mon, 06 Sep 2004 08:44:49 GMT
Hi,

I'm looking for a possibility to use colorised output with the
Consoleappender such that

2004-09-06 10:16:58,567 [xxx (yyy: lll)] INFO - msg
will appear in yellow
2004-09-06 10:16:58,568 [xxx (yyy: lll)] ERROR - msg
will appear in red

comparable to
http://ant.apache.org/manual/listeners.html#AnsiColorLogger

If I'm right I only have to change the appender configuration
currently I'm using
       <appender name="appender" 
class="org.apache.log4j.ConsoleAppender">
         <layout class="org.apache.log4j.PatternLayout">
           <param name="ConversionPattern" value="%d [%l] %p - %m%n"/>
         </layout>
       </appender>
but I don't have any idea how.

Thanks in advance

Ingo

PS: on the wiki page
http://wiki.apache.org/logging-log4j/Log4JProjectPages is the old
mailinglist address


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message