logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Nicholson <robert.nichol...@gmail.com>
Subject Re: DailyRollingAppender doing strange things with log4j-1.2.14
Date Thu, 17 Jul 2008 12:54:59 GMT
That isn't the case. In so far as there aren't two instances of  
DailyRollingFileAppender writing to the same location. That said the  
application is multithreaded but that all should be synchronized.

On Jul 17, 2008, at 1:00 AM, Curt Arnold wrote:

>
> On Jul 16, 2008, at 2:03 PM, Robert Nicholson wrote:
>
>> I'm noticying right now the following situation
>>
>>
>> -rw-r--r--  1  311170 Jul 16 14:00 name.log
>>
>> -rw-r--r--  1  455880 Jul 16 14:00 name.log.2008-07-15
>>
>> What you should see is that today's log is actively overwriting  
>> yesterday's
>> rolled log.
>>
>> So yesterdays log is history as it's been overwritten.
>>
>> Can anybody explain this behaviour and whether a newer version  
>> corrects this
>> problem?
>
> Very common and expected behavior if you have two instances of  
> DailyRollingFileAppender writing to the same location on a Unix.   
> One instances renames the current file and creates a new file, when  
> the second instance attempts to roll, it cannot create the new file  
> and continues writing to the "old" file, but now renamed file.  The  
> moral is not not allow two instances of DailyRollingFileAppender to  
> contend for the same file names.
>
>
> ---------------------------------------------------------------------
> 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