logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sarat kumar <techbeesadig...@gmail.com>
Subject Re: Alternative naming convention for renaming files using RollingFileAppender
Date Tue, 12 May 2009 15:04:48 GMT
Hi Mr.Curt Arnold,

Thanks very much for your suggestion. I found that class perfectly fits my
bill. Thanks again for the prompt response.

Thanks and Regards,
Sarat Kumar Beesa.

On Tue, May 12, 2009 at 6:25 PM, Curt Arnold <carnold@apache.org> wrote:

> I believe the org.apache.log4j.rolling.RollingFileAppender in the extras
> companion has that ability.  The org.apache.log4j.rolling.RFA are the
> backported RFAs from the abandoned log4j 1.3 line.
> On May 12, 2009, at 7:13 AM, sarat kumar wrote:
>  Hi all,
>> I have a question on the renaming strategy followed in the
>> RollingFileAppender in log4j. The current logic works by rolling over the
>> current file by appending the index count at the end. I was wondering if
>> there's a custom appender available which can allow me to customize the
>> renaming strategy followed while rolling over to a new file.
>> Basically, the requirement I have is that.. I need to rollover to new log
>> file if it reaches a threshold size and when I rollover, the old file
>> should
>> be renamed with a timestamp in it. After going through the documentation I
>> figured out the daily appender does the job I want by adding timestamp at
>> the end of the file name, but it can't rollover the file based on its
>> size.
>> I also searched in couple of forums that I know and found no fruitful
>> results.
>> Finally, I have checked the source code and figured out the 'rollover'
>> method typically hard codes logic to rollover the current file with
>> appending the index information to it. So, i guess my option is only to
>> look
>> for third party appenders which can provide this functionality.
>> Can anyone point me to the right direction here ? if you know any third
>> party log4j appenders which can address this issue, it'd be of great help
>> for me.
>> Thanks in advance for your replies.
>> Regards,
>> Sarat kumar Beesa.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message