开发者

LOGBACK: No context given for ch.qos.logback.classic.gaffer.ConfigurationDelegate@

开发者 https://www.devze.com 2023-04-05 18:31 出处:网络
I get the above message on the console at the start of program execution, and am unclear how to resolve it. For information, the program is written in Scala, uses the grizzled-slf4j adapter over slf4j

I get the above message on the console at the start of program execution, and am unclear how to resolve it. For information, the program is written in Scala, uses the grizzled-slf4j adapter over slf4j with the logback provider, and has a logback.groovy file in the classpath. Here's the latter's contents:

import static ch.qos.logback.classic.Level.*
import ch.qos.logback.classic.encoder.*
import ch.qos.logback.clas开发者_JAVA技巧sic.filter.*
import ch.qos.logback.core.*
import ch.qos.logback.core.status.OnConsoleStatusListener

statusListener(OnConsoleStatusListener)

appender("STDOUT", ConsoleAppender) {
  filter(ThresholdFilter) {
    level = INFO
  }
  encoder(PatternLayoutEncoder) {
    pattern = "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
  }
}

root(INFO, ['WARN'])

Ideas welcome (the logging itself works fine, the issue is just the initial message).


Change

root(INFO, ['WARN'])

to

root(INFO, ['STDOUT'])
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号