当前位置: 动力学知识库 > 问答 > 编程问答 >

scala - LOGBACK: No context given for [email protected]

问题描述:

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.classic.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'])
分享给朋友:
您可能感兴趣的文章:
随机阅读: