In a word, "yes". 
You'll probably need to override setFile as well. Just stick the class on your 
classpath and specify the class in the log4j properties file : 
log4j.appender.<appender_name>=<xtended roller class>

> -----Original Message-----
> From: Jalt One [mailto:[EMAIL PROTECTED]
> Sent: Tuesday 16 March 2004 20:12
> To: [EMAIL PROTECTED]
> Subject: extending RollingFileAppender
> 
> 
> Hello,
> 
> I've never extended any of the Log4j classes before, although 
> I've been
> using Log4j for more than 2 years now. I have this new requirement to
> roll logs based on size, but instead of rotating them as
> RollingFileAppender does, I should just append a timestamp to 
> the rolled
> file and that's it. (The application needn't worry about 
> filling up the
> file system because that will be someone else's responsibility.) So,
> could someone please confirm whether my idea of extending
> RollingFileAppender and overriding the rollOver() method is 
> the simplest
> and most straightforward thing to do that will meet the requirement?
> 
> Fyi, I've read the plan web page, and I eagerly await the rolling
> strategy feature for the 1.3 release. Imo, this feature 
> should have been
> present from the get-go, i.e., separate the policy and 
> mechanism features
> of file appenders so users can have a wide latitude in mixing and
> matching policies and mechanisms depending on the 
> requirements they have.
> 
> Thanks,
> Alex
> 
> -- 
> http://www.fastmail.fm - Send your email first class
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


This message has been scanned for viruses by MailControl - www.mailcontrol.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to