如果您只是将一些logback.groovy
(或logback.xml
)文件放在(推荐的)src/logback.groovy
位置,您可能会遇到类似的(控制台)警告:
13:21:08,177 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.groovy] at [file:/D:/my-proj-gwt/src-resource/logback.groovy]
13:21:08,178 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.groovy] occurs multiple times on the classpath.
13:21:08,178 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.groovy] occurs at [file:/D:/my-proj-gwt/war/WEB-INF/classes/logback.groovy]
13:21:08,178 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.groovy] occurs at [file:/D:/my-proj-gwt/src-resource/logback.groovy]
包括日志记录详细信息输出。由于类路径 (和) 中多次出现 logback 配置文件,因此包含日志记录INFO
输出。src/
war/WEB-INF/classes
我找到了解决这个问题的方法,如下所示......