Log file not rolling using RollingFileAppender
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramkumar_Jeyaraman
Posted On:   Wednesday, November 14, 2007 03:17 PM

I'm using a RollingFileAppender and my log files are getting overwritten instead of rolling. I see "setFile called: d:/logs/app_logs/MyProject/App.log, false" in stdout.log. Why is it false? This should be true. I also see an attempt to rename the file in stdout.log, but not sure whats preventing the renaming from happening. I suspect some admin rights or server setting causing the problem, but wanted to see if anyone has seen this before. Here's my log4j.xml configuration. I made the MaxFileSize 5KB for testing: class="org.apache.log4j.RollingFileAppender"> value="d:/logs/app_logs/MyProject/App.lo   More>>

I'm using a RollingFileAppender and my log files are
getting overwritten instead of rolling. I see
"setFile called: d:/logs/app_logs/MyProject/App.log, false" in stdout.log. Why is it false? This should be true.


I also see an attempt to rename the file in stdout.log,
but not sure whats preventing the renaming from happening.
I suspect some admin rights or server setting causing the problem,
but wanted to see if anyone has seen this before.


Here's my log4j.xml configuration. I made the MaxFileSize 5KB for testing:



class="org.apache.log4j.RollingFileAppender">


value="d:/logs/app_logs/MyProject/App.log" />






class="org.apache.log4j.PatternLayout">


value="[5.st]%d[5.DT]%-5p[5.PRI]%X{USERID}[5.NDC]%t[5.THD]%m[5.MES]%c[5.CAT]%X{enterpriseSessionId}[5.LOC]%n" />







Here's the snippet from stdout.log


[11/14/07 13:35:47:692 CST] 7c9ee55d SystemOut O log4j: Renaming file d:logsapp_logsMyProjectApp.log to
d:logsapp_logsMyProjectApp.log.1
[11/14/07 13:35:47:692 CST] 7c9ee55d SystemOut O log4j:
setFile called: d:/logs/app_logs/MyProject/App.log, false

[11/14/07 13:35:47:692 CST] 7c9ee55d SystemOut O log4j: setFile ended


Please use html tags to format code blocks.

   <<Less
About | Sitemap | Contact