Trouble enabling Grails logging
Posted
by
Dave
on Stack Overflow
See other posts from Stack Overflow
or by Dave
Published on 2011-06-30T14:12:39Z
Indexed on
2011/07/01
8:22 UTC
Read the original article
Hit count: 374
I have this logging configuration in my Config.groovy file. This is a development environment, started as such. I have verified the file exists and there are 775 perms on the file, but nothing is getting output to the file.
// set per-environment serverURL stem for creating absolute links
environments {
production {
grails.serverURL = "http://www.changeme.com"
}
development {
grails.serverURL = "http://localhost:8080/${appName}"
logFilePath = "/Users/davea/Tomcat/logs/log4j.log"
}
test {
grails.serverURL = "http://localhost:8080/${appName}"
}
}
// log4j configuration
log4j = {
console name:'Appender1',
layout:pattern(conversionPattern: '%-4r [%t] %-5p %c %x - %m%n')
rollingFile name:'Appender2', maxFileSize:1024 * 1024, file:logFilePath,
layout:pattern(conversionPattern: '%-4r [%t] %-5p %c %x - %m%n')
root {
debug 'Appender1', 'Appender2'
}
}
Can anyone tell what's wrong with my configuration? Thanks, - Dave
© Stack Overflow or respective owner