20 lines
563 B
Groovy
20 lines
563 B
Groovy
|
import ch.qos.logback.core.joran.spi.ConsoleTarget
|
||
|
import ch.qos.logback.core.ConsoleAppender
|
||
|
|
||
|
def environment = System.getenv("ENVIRONMENT") ?: "production"
|
||
|
|
||
|
def defaultLevel = INFO
|
||
|
def defaultTarget = ConsoleTarget.SystemErr
|
||
|
|
||
|
appender("CONSOLE", ConsoleAppender) {
|
||
|
encoder(PatternLayoutEncoder) {
|
||
|
pattern = "WAWA:: %boldGreen(%d{yyyy-MM-dd}) %boldYellow(%d{HH:mm:ss}) %gray(|) %highlight(%5level) %gray(|) %boldMagenta(%40.40logger{40}) %gray(|) %msg%n"
|
||
|
|
||
|
withJansi = true
|
||
|
}
|
||
|
|
||
|
target = defaultTarget
|
||
|
}
|
||
|
|
||
|
root(defaultLevel, ["CONSOLE"])
|