I try to separate the log of information, warnings and errors, I made the following configuration, but in the information file I continue to log other types of logs in one file, I already tried to search for other topics, but I did not find a solution, who can help?
def logLayoutPattern = new PatternLayout("%d{yyyy-MM-dd/HH:mm:ss.SSS} %x %-5p %c{2} - %m%n") appenders { appender new DailyRollingFileAppender(name: "perfil",threshold: Level.INFO,file: "/tmp/logs/file_perfil.log",datePattern: "'.'yyyy-MM-dd",layout: logLayoutPattern) appender new DailyRollingFileAppender(name: "errors",threshold: Level.ERROR,file: "/tmp/logs/file_errors.log",datePattern: "'.'yyyy-MM-dd",layout: logLayoutPattern) appender new DailyRollingFileAppender(name: "warn",threshold: Level.WARN,file: "/tmp/logs/file_warn.log",datePattern: "'.'yyyy-MM-dd",layout: logLayoutPattern) } info perfil: ["grails.app.controllers.com.app.PerfilController"] warn warn: 'grails.app' error errors: ['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'] root { error 'errors' additivity = false warn 'warn' additivity = false info 'perfil' additivity = false }
Paulo source share