Hi all

I am quire fascinated about the powers and ease logback gives to its users.
I am experimenting with various options it offers like appenders, encoders
etc.Recently I though if we could color code the log messages for various
logging levels. For example, red for Error, Green for Trace etc. I have
these options with me but none seemed to work as desired:

- Extending <code> ClassicConverter </code> & overriding <code>
convert(ILoggingEvent) </code> as given in the documentation chapter 6 for
Creating a custom conversion specifier. This way, I could color the level
using <code> event.getLevel() </code> but *could not color the entire log
statement* as per my wish.

- On the page http://logback.qos.ch/demo.html it is written that "You can
color log statements with markers. Markers are part of the SLF4J API." But I
could not find any example for that.

- I tried extending <code> RollingFileAppender </code> and in the <code>
subAppend </code> I tried to access <code>quirtWriter qs </code> as one
could do in earlier versions, but now <code> qs </code> is not visible.

Please guide for the appropriate way of doing it as well as provide some
directions / examples.


Thanks & Regards
Vaibhav Malhotra
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user

Reply via email to