Hi all<div><br></div><div>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:</div>
<div><br></div><div>- 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 <b>could not color the entire log statement</b> as per my wish.</div>
<div><br></div><div>- On the page <a href="http://logback.qos.ch/demo.html">http://logback.qos.ch/demo.html</a> 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.</div>
<div><br></div><div>- 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.</div>
<div><br></div><div>Please guide for the appropriate way of doing it as well as provide some directions / examples. </div><div><br></div><div><br></div><div>Thanks & Regards</div><div>Vaibhav Malhotra</div>