I have been trying for hours trying to display log messages (either to a file or to the console) when performing integration tests. I suggested that I could use the following code to add a log message:
log.debug "Some useful information here"
I commented out the following line in _GrailsWar.groovy:
target(startLogging:"Bootstraps logging") {
}
as suggested here http://jira.codehaus.org/browse/GRAILS-4470
The log4j section is Config.groovyas follows:
log4j = {
appenders {
file name:'file', file:'C:/Users/Christopher/Documents/NetBeansProjects/TestProject/smyh.log', append: false
console name:'stdout'
}
error 'org.codehaus.groovy.grails.web.servlet',
'org.codehaus.groovy.grails.web.pages',
'org.codehaus.groovy.grails.web.sitemesh',
'org.codehaus.groovy.grails.web.mapping.filter',
'org.codehaus.groovy.grails.web.mapping',
'org.codehaus.groovy.grails.commons',
'org.codehaus.groovy.grails.plugins',
'org.codehaus.groovy.grails.orm.hibernate',
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'
warn 'org.mortbay.log'
debug 'grails.app'
info 'grails.app'
root {
error 'file', stdout
info 'file', stdout
warn 'file', stdout
debug 'file', stdout
additivity = true
}
}
Does anyone know why I don't see log messages during integration tests?
Thanks so much for your time.
source
share