I can't seem to get the file log4j file to write to the file in the grails application. The file is created in the directory that I expect, when I start in debug mode, I see that the log method is being called, but still no results in the file. Application code and log code below. I made log4j configuration as simple as possible to fix any complex problems. Ideas?
abstract class BaseJob {
abstract def executeTask()
def execute() {
beginTask()
executeTask()
endTask()
}
def beginTask()
{
log.error("Started task: " + this.class)
}
def endTask()
{
log.error("Finished task: " + this.class)
}
}
log4j = {
appenders {
file name:'myLogger', file:"all.log", immediateFlush:'true', threshold:org.apache.log4j.Level.DEBUG
}
debug 'grails.app'
}
source
share