You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Arunkumar <sa...@lightsurf.com> on 2005/09/01 14:44:35 UTC

Log4j with 0 bytes - Rolling not happening properly

 I have a doubt w.r.t. the RollingFileAppender properties in 
log4j.xml. It somtimes just stop writing to the  log file. 
It happens when the file ended and it need to open new 
file. (I guess it dont succeed opening the new file).After
starting my program again it write to the file 
as needed(via log4j)  can you help me?It sometimes 
writes the file with 0 (zero) bytes. Can you please tell
me why the problem is? Im using the below properties 

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>  
    <appender name="STDOUT" class="org.apache.log4j.
RollingFileAppender">    
       <param
name="File"value="/var/lsurf/log/sprint-alerts-cps/
sprint-alerts-cps.log"/>         
       <param name="MaxFileSize" value="250MB"/>    
       <param name="MaxBackupIndex" value = "50" />    
    <layout class="org.apache.log4j.PatternLayout">      
       <param name="ConversionPattern" value="%d{ABSOLUTE} %5p 
[%t] %c{1}:%L -  
       %m%n"/>
    </layout>  
   </appender>  
<category name="com.lightsurf.alertscore">    
    <priority value="info" />  
</category>  <root>    
<priority value="warn" />    
<appender-ref ref="STDOUT" />  </root>
</log4j:configuration>

I have not used any CountDirection property. Do I need to use it.
Expecting an early reply .

Regards

Arun


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org