org.scalatra
Adds ANSI colorization of the log level for use in the console.
An example of a logback.xml file:
<configuration> <conversionRule conversionWord="levelcolor" converterClass="org.scalatra.slf4j.LevelColorizer" /> <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> <encoder> <pattern>[%4levelcolor] [%d{ISO8601}] [%X{thread}] [%logger{4}]: %m%n</pattern> </encoder> </appender> <root level="INFO"> <appender-ref ref="STDOUT"/> </root> </configuration>
Adds ANSI colorization of the log level for use in the console.
An example of a logback.xml file: