log4j in grails: wie logge ich mich in die datei ein?

Ich habe diese log4j-Konfiguration in meinem grails config.groovy

log4j = {
    error  'org.codehaus.groovy.grails.web.servlet',  //  controllers
                   'org.codehaus.groovy.grails.web.pages' //  GSP
    warn 'org.mortbay.log' 


    appenders {
        rollingFile  name:'infoLog', file:'info.log', threshold: org.apache.log4j.Level.INFO, maxFileSize:1024
        rollingFile  name:'warnLog', file:'warn.log', threshold: org.apache.log4j.Level.WARN, maxFileSize:1024
        rollingFile  name:'errorLog', file:'error.log', threshold: org.apache.log4j.Level.ERROR, maxFileSize:1024
        rollingFile  name:'custom', file:'custom.log', maxFileSize:1024
    }

    root {
        info 'infoLog','warnLog','errorLog','custom', stdout
        error()
        additivity = true
    }
}

Das infoLog, warnLog und errorLog war von der vorherigen Frage ... sie funktionierten gut.

jetzt füge ich ein neues RollingFile mit dem Namen "custom" hinzu ...

Ich habe versucht, mich von meinem Controller und Service mit log.info ("something .... $ {obj}") anzumelden. Aber es scheint, dass die Nachricht nicht in custom.log eingefügt wurde. Muss ich der Konfiguration etwas hinzufügen?

Danke dir !!

Antworten auf die Frage(3)

Ihre Antwort auf die Frage