My Grails应用程序日志中充斥着数千条消息,如:
2010-05-21 18:54:08,261 [30462143@qtp-19943008-38] DEBUG hibernate.EhCache - key: ga_event value: 5220206380077056
这是我的log4j配置:
// log4j configuration
log4j = {
// Example of changing the log pattern for the default console
// appender:
//
appenders {
console name:'stdout',layout:pattern(conversionPattern: '%c{2} %m%n')
rollingFile name:'applog', file: logDirectory+"/${appName}_main.log", maxFileSize:'10MB'
//'null' name:'stacktrace'
file name: 'stacktrace', file: logDirectory+"/${appName}_stacktrace.log", layout: pattern(conversionPattern: '%c{2} %m%n')
}
error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate',
stacktrace: "stacktrace"
warn 'org.mortbay.log'
root {
debug 'stdout', 'applog'
additivity = true
}
}
关于如何禁用该日志的任何想法?
干杯
答案 0 :(得分:1)
尝试添加到错误块net.sf.ehcache