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 chouaffe frannck-edmond <ch...@yahoo.fr> on 2014/07/29 10:18:39 UTC

RollingFileAppender

Hi Guys,

I have been struggling to get my log4j.xml file working as intended. 
I expect the log files rollover once the 100KB size has been reached. However the log4j does write in multiple log file simultaniously.

How can this be? I would expect log4j to write to a single until the maxfilesize is reached. The file will then be backed up and so on.

I really need some inputs of yours

Thanks
 
Edmond Chouaffé 

Re: RollingFileAppender

Posted by chouaffe frannck-edmond <ch...@yahoo.fr>.
It is log4j 1.2.17.
Here is a snippet of the log4j.xml file:
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="./log/test.log" />
<param name="Append" value="true" />
<param name="Encoding" value="UTF-8" />
<param name="Threshold" value="INFO" />
<param name="MaxFileSize" value="100KB" />
<param name="MaxBackupIndex" value="10" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{dd-MM-yyyy HH:mm:ss} %-5p %c{1} - %m%n" />
</layout>
</appender>


>log4j does write in multiple log files simultaniously

means that it does write into test.log, then into test.log.1 and again to test.log and so on.
I would expect the logs the be written into test.log until the file gets 100KB big.



Edmond Chouaffé 
Mobile +49 172 655 06 01


________________________________
 De : Remko Popma <re...@gmail.com>
À : Log4J Users List <lo...@logging.apache.org> 
Envoyé le : Mardi 29 juillet 2014 10h28
Objet : Re: RollingFileAppender
 

Is this log4j 1.2.x or 2.0?
And what do you mean by 
> log4j does write in multiple log file simultaniously?

Sent from my iPhone


> On 2014/07/29, at 17:18, chouaffe frannck-edmond <ch...@yahoo.fr> wrote:
> 
> Hi Guys,
> 
> I have been struggling to get my log4j.xml file working as intended. 
> I expect the log files rollover once the 100KB size has been reached. However the log4j does write in multiple log file simultaniously.
> 
> How can this be? I would expect log4j to write to a single until the maxfilesize is reached. The file will then be backed up and so on.
> 
> I really need some inputs of yours
> 
> Thanks
>  
> Edmond Chouaffé 

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

Re: RollingFileAppender

Posted by Remko Popma <re...@gmail.com>.
Is this log4j 1.2.x or 2.0?
And what do you mean by 
> log4j does write in multiple log file simultaniously?

Sent from my iPhone

> On 2014/07/29, at 17:18, chouaffe frannck-edmond <ch...@yahoo.fr> wrote:
> 
> Hi Guys,
> 
> I have been struggling to get my log4j.xml file working as intended. 
> I expect the log files rollover once the 100KB size has been reached. However the log4j does write in multiple log file simultaniously.
> 
> How can this be? I would expect log4j to write to a single until the maxfilesize is reached. The file will then be backed up and so on.
> 
> I really need some inputs of yours
> 
> Thanks
>  
> Edmond Chouaffé 

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