logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: Issue in RollingFileAppender when using both OnStartupTriggeringPolicy and TimeBasedTriggeringPolicy.
Date Sun, 03 Aug 2014 11:34:00 GMT
We will look into this, but can you create a Jira ticket for this and attach your config file?

One workaround may be to set append="true" for the rolling file appender. 

Remko

Sent from my iPhone

> On 2014/08/03, at 19:55, parkirat <parkirat@bsb.in> wrote:
> 
> I am using Rolling File Appender with the Log4j2 2.0 version jar.
> 
> Now when I use both OnStartupTriggeringPolicy and TimeBasedTriggeringPolicy
> set with the interval 3 minutes and use the OnStartupTriggeringPolicy policy
> to roll at the server restart.
> 
> Now if, my file pattern has only date pattern set (%d{yyyy-MM-dd-HH-mm}) and
> not %i, and I restart the server more than 3-4 times, the policy rolls the
> file to future time and when the TimeBasedTriggeringPolicy tries to roll the
> file, possibility is that file is already present due to rollover by
> restarting the server many times and that earlier log file gets overwritten.
> 
> This leads to loss of the logging thus I think OnStartupTriggeringPolicy
> policy when does a rollover, should all the currentTimeMillis to the log
> file name as well.
> 
> Could you please look into this issue?
> 
> Regards,
> Parkirat Singh Bagga.
> 
> 
> 
> --
> View this message in context: http://apache-logging.6191.n7.nabble.com/Issue-in-RollingFileAppender-when-using-both-OnStartupTriggeringPolicy-and-TimeBasedTriggeringPolicy-tp49998.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 

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


Mime
View raw message