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 "Bansemir, Carsten" <Ca...@huk-coburg.de> on 2003/12/01 10:57:56 UTC

AW: DailyRollingFileAppender with filesize option

Hi, some time ago i wrote the following to the log4j-dev mailing list:

----
Hi, 
I had several problems with the DailyRollingFileAppender (see user mailing list), so I downloaded the DailyRollingAppenderExt.jar but I can't find the source of this file again (so I also can't find out the author of this Class).

I extended this class so that the Appender rolls by date AND by size, like the CompositeRollingFileAppender does, with the difference that it logs to a different file every day, without having to rename any files (that was the problem with threads logging to yesterday's dir because the Java method "renameTo()" fails in the RollingFileAppender or the CompositeRollingFileAppender.

My question is: Are you interested in this Appender? and if so, do you know who the original author of DailyRollingFileAppenderExt was? 
I would like to give this appender out to the people searching for something like that in the mailing list, it's almost an FAQ, but I would like to ask the original author before.
----

So if someone finds out the the author of the original DailyRollingFileAppenderExt please tell me, that I can give out the modified one to the people who want it.


-----Ursprüngliche Nachricht-----
Von: Manju Joseph [mailto:manjumarat@hotmail.com]
Gesendet: Sonntag, 30. November 2003 03:08
An: log4j-user@jakarta.apache.org
Betreff: Fwd: DailyRollingFileAppender with filesize option




Hello..,

Me too getting the same error.....Can  any one help


MANJU

>From: "Divya Shetty" <di...@pune.tcs.co.in>
>Reply-To: "Log4J Users List" <lo...@jakarta.apache.org>
>To: "Log4J Users List" <lo...@jakarta.apache.org>
>Subject: DailyRollingFileAppender with filesize option
>Date: Sat, 29 Nov 2003 14:30:46 +0530
>
>In the CompositeRollingAppender, the reference made to setFile provides a 
>String and boolean as parameter while the setFile in FileAppender which 
>accepts two arguments expects Layout and Boolean.
>Hence am unable to compile ti..
>
>None in our project has used log4J before and the lack of time is causing 
>to be a deterent in workign it out for ourselves.
>Would it be possible to either download the CompositeRollingAppender.class 
>or the jar which has been updated with the CompositeRollingAppender.class ?
>
>
>
>----- Original Message -----
>From: Divya Shetty
>To: Log4J Users List
>Sent: Saturday, November 29, 2003 1:32 PM
>Subject: Fw: DailyRollingFileAppender with filesize option
>
>
>I downloaded log4j-1.2.8.jar.
>Along with this i found the CompositeRollingAppender.java in the 
>contributions folder.
>
>In this file, on line 362 the method super.setFile(fileName, append) is 
>called.
>In the FileAppender, there is no overloaded method where only two arguments 
>are provided and hence it fails in the compilation.
>
>Is this a known issue or has someone already resolved it?
>
>Thanks
>
>Divya
>
>----- Original Message -----
>From: Divya Shetty
>To: Log4J Users List
>Sent: Saturday, November 29, 2003 11:00 AM
>Subject: DailyRollingFileAppender with filesize option
>
>
>Hi,
>
>I have the following log4j property file:
>
>log4j.rootLogger=debug, A
>log4j.logger.SickPay=debug, SP
>
>log4j.appender.SP=org.apache.log4j.DailyRollingFileAppender
>log4j.appender.SP.File=COMMON~1\\Trial\\SP.log
>log4j.appender.SP.MaxFileSize=1KB
>log4j.appender.SP.MaxBackupIndex=6
>log4j.appender.SP.layout=org.apache.log4j.PatternLayout
>log4j.appender.SP.layout.ConversionPattern=%d ::%m%n
>
>I need to roll over the file on basis of both the date and Size of the 
>file.
>When i run the application it gives me the compilation error:
>log4j:WARN No such property [maxBackupIndex] in 
>org.apache.log4j.DailyRollingFileAppender.
>log4j:WARN No such property [maxFileSize] in 
>org.apache.log4j.DailyRollingFileAppender.
>
>I checked the Mail list archive and there was a suggestion that one use 
>CompositeRollingFileAppender.
>Where can i find CompositeRollingFileAppender?
>
>Could anyone suggest a way to implement this?
>
>Regards,
>Divya Shetty

_________________________________________________________________
BharatMatrimony.com. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 
India's premium matrimonial website.


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


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


DailyRollingFileAppenderExt

Posted by Rajesh Reddy <ra...@yahoo.com>.
Hi,
    i have problems in using DailyRollingFileAppenderExt and from the net i 
came to know the causes and also remedies. So of my knowledge if i can have 
modified versions of DailyRollingFileAppenderExt.class and FileAppender.class 
i can solve my problem.
can some one tell me where i can find them.

Thanks
Rajesh Reddy k


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


Re: AW: DailyRollingFileAppender with filesize option

Posted by Paul Smith <pa...@lawlex.com.au>.
Hi Carsten,

It is my understanding, and I may be wrong here, that Ceki has
completely rewritten the whole rolling appender framework to allow much
more flexibility in the composition of different rules for rolling. This
unfortunately not in the released version at this time, but the 1.3
release is not that far away.

We appreciate your contribution, perhaps you could attach the files to a
bug item (if you haven't done so already), so that your efforts don't
get lost if my understanding is not correct.

cheers,

Paul Smith

On Mon, 2003-12-01 at 20:57, Bansemir, Carsten wrote:
> Hi, some time ago i wrote the following to the log4j-dev mailing list:
> 
> ----
> Hi, 
> I had several problems with the DailyRollingFileAppender (see user mailing list), so I downloaded the DailyRollingAppenderExt.jar but I can't find the source of this file again (so I also can't find out the author of this Class).
> 
> I extended this class so that the Appender rolls by date AND by size, like the CompositeRollingFileAppender does, with the difference that it logs to a different file every day, without having to rename any files (that was the problem with threads logging to yesterday's dir because the Java method "renameTo()" fails in the RollingFileAppender or the CompositeRollingFileAppender.
> 
> My question is: Are you interested in this Appender? and if so, do you know who the original author of DailyRollingFileAppenderExt was? 
> I would like to give this appender out to the people searching for something like that in the mailing list, it's almost an FAQ, but I would like to ask the original author before.
> ----
> 
> So if someone finds out the the author of the original DailyRollingFileAppenderExt please tell me, that I can give out the modified one to the people who want it.
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Manju Joseph [mailto:manjumarat@hotmail.com]
> Gesendet: Sonntag, 30. November 2003 03:08
> An: log4j-user@jakarta.apache.org
> Betreff: Fwd: DailyRollingFileAppender with filesize option
> 
> 
> 
> 
> Hello..,
> 
> Me too getting the same error.....Can  any one help
> 
> 
> MANJU
> 
> >From: "Divya Shetty" <di...@pune.tcs.co.in>
> >Reply-To: "Log4J Users List" <lo...@jakarta.apache.org>
> >To: "Log4J Users List" <lo...@jakarta.apache.org>
> >Subject: DailyRollingFileAppender with filesize option
> >Date: Sat, 29 Nov 2003 14:30:46 +0530
> >
> >In the CompositeRollingAppender, the reference made to setFile provides a 
> >String and boolean as parameter while the setFile in FileAppender which 
> >accepts two arguments expects Layout and Boolean.
> >Hence am unable to compile ti..
> >
> >None in our project has used log4J before and the lack of time is causing 
> >to be a deterent in workign it out for ourselves.
> >Would it be possible to either download the CompositeRollingAppender.class 
> >or the jar which has been updated with the CompositeRollingAppender.class ?
> >
> >
> >
> >----- Original Message -----
> >From: Divya Shetty
> >To: Log4J Users List
> >Sent: Saturday, November 29, 2003 1:32 PM
> >Subject: Fw: DailyRollingFileAppender with filesize option
> >
> >
> >I downloaded log4j-1.2.8.jar.
> >Along with this i found the CompositeRollingAppender.java in the 
> >contributions folder.
> >
> >In this file, on line 362 the method super.setFile(fileName, append) is 
> >called.
> >In the FileAppender, there is no overloaded method where only two arguments 
> >are provided and hence it fails in the compilation.
> >
> >Is this a known issue or has someone already resolved it?
> >
> >Thanks
> >
> >Divya
> >
> >----- Original Message -----
> >From: Divya Shetty
> >To: Log4J Users List
> >Sent: Saturday, November 29, 2003 11:00 AM
> >Subject: DailyRollingFileAppender with filesize option
> >
> >
> >Hi,
> >
> >I have the following log4j property file:
> >
> >log4j.rootLogger=debug, A
> >log4j.logger.SickPay=debug, SP
> >
> >log4j.appender.SP=org.apache.log4j.DailyRollingFileAppender
> >log4j.appender.SP.File=COMMON~1\\Trial\\SP.log
> >log4j.appender.SP.MaxFileSize=1KB
> >log4j.appender.SP.MaxBackupIndex=6
> >log4j.appender.SP.layout=org.apache.log4j.PatternLayout
> >log4j.appender.SP.layout.ConversionPattern=%d ::%m%n
> >
> >I need to roll over the file on basis of both the date and Size of the 
> >file.
> >When i run the application it gives me the compilation error:
> >log4j:WARN No such property [maxBackupIndex] in 
> >org.apache.log4j.DailyRollingFileAppender.
> >log4j:WARN No such property [maxFileSize] in 
> >org.apache.log4j.DailyRollingFileAppender.
> >
> >I checked the Mail list archive and there was a suggestion that one use 
> >CompositeRollingFileAppender.
> >Where can i find CompositeRollingFileAppender?
> >
> >Could anyone suggest a way to implement this?
> >
> >Regards,
> >Divya Shetty
> 
> _________________________________________________________________
> BharatMatrimony.com. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74
> India's premium matrimonial website.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org


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