dcsimg
FileAppender class
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shridhar_V
Posted On:   Wednesday, October 22, 2008 05:03 AM

We use the FileAppender.java class to append to the logfiles using log4j.xml. I have written a custom class which makes the log to rollover into a new file everytime the file that is being written into exceeds its limit.
But the problem I am facing is whenever the server is brought down and started again, instead of picking up the file that was last appended to, it starts writing into a new file. Is there a way to make it pick the last file that was modified and append to it?

Re: FileAppender class

Posted By:   ashish_soni  
Posted On:   Wednesday, November 26, 2008 05:13 PM

Hi Shridhar,

Try using RollingFileAppender. Also you can configure the 'MaxFileSize' property to set the max limit of the log file.

About | Sitemap | Contact