Instance Constructors
-
new
LevelColorizer
()
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
addError
(arg0: String, arg1: Throwable): Unit
-
def
addError
(arg0: String): Unit
-
def
addInfo
(arg0: String, arg1: Throwable): Unit
-
def
addInfo
(arg0: String): Unit
-
def
addStatus
(arg0: Status): Unit
-
def
addWarn
(arg0: String, arg1: Throwable): Unit
-
def
addWarn
(arg0: String): Unit
-
def
asInstanceOf
[T0]
: T0
-
def
clone
(): AnyRef
-
def
convert
(event: ILoggingEvent): String
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
getContext
(): Context
-
def
getFirstOption
(): String
-
def
getFormattingInfo
(): FormatInfo
-
def
getNext
(): Converter[ILoggingEvent]
-
def
getOptionList
(): List[String]
-
def
hashCode
(): Int
-
def
isInstanceOf
[T0]
: Boolean
-
def
isStarted
(): Boolean
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
setContext
(arg0: Context): Unit
-
def
setFormattingInfo
(arg0: FormatInfo): Unit
-
def
setNext
(arg0: Converter[ILoggingEvent]): Unit
-
def
setOptionList
(arg0: List[String]): Unit
-
def
start
(): Unit
-
def
stop
(): Unit
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
-
def
write
(arg0: StringBuilder, arg1: ILoggingEvent): Unit
Inherited from ClassicConverter
Inherited from DynamicConverter[ILoggingEvent]
Inherited from ContextAware
Inherited from LifeCycle
Inherited from FormattingConverter[ILoggingEvent]
Inherited from Converter[ILoggingEvent]
Inherited from AnyRef
Inherited from Any
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>