|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Log4J logging not writing to a fileHi
The rolling File is not working for me. I have searched the forum and implemented different ways. The stdout is working fine. The empty log file is getting created and there no logging taking place. Using Grails 1.2 M2.... appreciate help. thanks in advance ****** Starts****** // log4j configuration log4j = { root { debug 'buiDebugLog' error 'stdout', 'buiErrorLog' info 'stdout', 'buiInfoLog' additivity = true } appenders{ ['Error', 'Info', 'Debug'].each { rollingFile name:"bui${it}Log", file:"bui${it}Log.log", maxFileSize:"1MB", layout:pattern(conversionPattern: '%c{2} %m%n') } debug 'org.codehaus.groovy.grails.web.servlet', 'grail.app' warn 'org.mortbay.log' info 'grails.app' error 'org.codehaus.groovy.grails.web.servlet', // controllers 'org.codehaus.groovy.grails.web.pages', // GSP 'org.codehaus.groovy.grails.web.sitemesh', // layouts 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping 'org.codehaus.groovy.grails.web.mapping', // URL mapping 'org.codehaus.groovy.grails.commons', // core / classloading 'org.codehaus.groovy.grails.plugins', // plugins 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration 'org.springframework', 'org.hibernate' } ***** ENDS ******** Thanks Srini Srinivasa, Kadiyala |
|
|
Re: Log4J logging not writing to a fileHi
Any one can help?? Thanks Naga
Srinivasa, Kadiyala |
|
|
Re: Log4J logging not writing to a fileI've been using this type of configuration: appenders { rollingFile name:"errorLog", maxFileSize:"5MB", maxBackupIndex: 10, file:"/opt/grails-apps/myapp/logs/error.log", 'append':true, threshold:org.apache.log4j.Level.WARN rollingFile name:"debugLog", maxFileSize:"5MB", maxBackupIndex: 10, file:"/opt/grails-apps/myapp/logs/all.log", 'append':true, threshold:org.apache.log4j.Level.INFO console name:'stdout', threshold:org.apache.log4j.Level.WARN } root { info "debugLog", "errorLog", "stdout" } Maybe the problem is in the way you've tried to specify logging thresholds. Regards, Lari Srinivasa, Kadiyala wrote: Hi Any one can help?? Thanks Naga Srinivasa, Kadiyala wrote: |
|
|
Re: Log4J logging not writing to a fileHi Lari
Thanks for the reply. I have tried your same code snipped to test my code. It is creating the log files. But for some reason nothing is getting written to the files. Appreciate further help. Thanks Srini
Srinivasa, Kadiyala |
|
|
Re: Log4J logging not writing to a fileHave been experiencing the same thing myself and still not sure why
On Sat, Nov 7, 2009 at 11:02 AM, Srinivasa, Kadiyala <srinivasa_kadiyala@...> wrote:
-- "We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Dr. Niels Bohr ### Craft @ http://www.linkedin.com/in/jpimmel ### Vox @ http://act.ualise.com/blogs/continuous-innovation ### Twit @ http://twitter.com/franklywatson |
|
|
Re: Log4J logging not writing to a fileSrinivasa, I don't think this is legal:
root { debug 'buiDebugLog' error 'stdout', 'buiErrorLog' info 'stdout', 'buiInfoLog' additivity = true } Try just one line. Generally your config is way too complicated to easily debug. I would break it down to the basics and get it going, then build complexity from there. 2009/11/8 j pimmel <frankly.watson@...> Have been experiencing the same thing myself and still not sure why |
| Free embeddable forum powered by Nabble | Forum Help |