log4j - Output log of single class to file in Grails -


I am trying to redirect the log4j output of a package to a file. My configuration is as follows:

  log4j = {appenders {console name: 'stdout' appender new delhi rolling file adapter (name: 'audit', datepantern: "'.' Yayam-mm-dd ') File name: "$ {userHome} / $ {applicationName}. Log ", layout: pattern (conversion pattern: '% d [% t]% -5p% c {2}% x -% m% n'))} root {error 'stdout'} error 'org.codehaus.groovy. Grails.web.servlet ', // Controller' org.codehaus.groovy.grails.web.pages ', // GSP' org.codehaus.groovy.grails.web .sitemesh ', // layout' org.codehaus.groovy .grails.web.mapping.filter ', // URL Mapping' org.codehaus.groovy.grails.web.mapping ', // URL Mapping' org.codehaus.Groovy.grails.commons ', // core / classlogging' Org.codehaus.groovy.grails.plugins ', // plugins' org.codehaus.groovy .grails.orm.hibernate ', // Hibernate integration' org.springframework ',' org.hibernate ',' net.sf.ehcache .hibernate ',' StackTrace ',' org.hibernate.type ',' org.hibernate 'SQL', 'hibernate', 'org.hibernate.txt Wipe DESCRIPTOR SQL Basic Bender 'debug' grease.app '// Setting all gels for artwork information audit:' my.package.name ', additivity: false}   

Any way From the my.package.name package file is not written in the file but at stdout . When I put the audit logger in my root config, the logging is written in the file but the entry of other sections is also written in this file, which I am not

I just have to type the logging output of my.package.name into the file, all other logging can go to stdout . I have tried to play with additivity but I can not understand it

I my.package.name to grails.app. My.package.name .

.

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -