当我尝试将logger {...} 块添加到我的 Grails log4j 配置时,出于什么原因,我收到以下错误:
log4j:ERROR Method missing when configuring log4j: logger
谁能看到我的配置可能有什么问题?这是一个 Grails 1.3.3 应用程序(即将升级到 2)。
TIA,
约翰
log4j = {
error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'net.sf.ehcache.hibernate'
debug 'org.hibernate'
appenders {
console name:'stdout', layout:pattern(conversionPattern: '[%t] %-5p %c{2} %x - %m%n')
}
logger {
grails="error"
}
root {
info 'stdout'
}
}
我也事先收到以下错误,不知道是否相关?
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/pbwebguy/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/dev/src/tdstm-trunk/./plugins/jmesa-0.8/lib/slf4j-log4j12-1.4.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.