Configuration for log4j to log ERROR level to a DB table
Posted
by firnnauriel
on Stack Overflow
See other posts from Stack Overflow
or by firnnauriel
Published on 2010-05-31T03:56:42Z
Indexed on
2010/05/31
4:02 UTC
Read the original article
Hit count: 266
Using the default config of a fresh Grails project, how do i change it so that ONLY error level messages will go to 'Message' table?
// 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')
//}
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',
'net.sf.ehcache.hibernate'
warn 'org.mortbay.log'
}
Thanks for any leads on this.
© Stack Overflow or respective owner