File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Problem with DailyRollingFileAppender Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Problem with DailyRollingFileAppender" Watch "Problem with DailyRollingFileAppender" New topic

Problem with DailyRollingFileAppender

gayathri frenzy

Joined: May 14, 2008
Posts: 1
I have a problem with the Appenders used . In my project , we have several components each of which have a log4j.xml under WEB-INF. We have our own appender (say for example: abcappender) which implements AppenderSkeleton. With the help of the abcappender, we write the logs to the respective log files. Now we have a centralized logging place where DailyRollingAppenders are used to write the logs for the individual components. Say for eg : 5 components , we have 5 centralized logging files which are created with DailyRollingAppender Type. Now the prolem is the all the components logs are not rolled on a DailyBasis. Only 2 of them are getting rolled properly. Whereas for the others , the data is getting appended to the same file and the size is getting extremly large. The appenders are used in the same way for all the logs but the problem is seen only in 3 of the components. Can you please suggest me what needs to be done? Since i'm new to the log4j, i read about the appenders and understood. But not able to identify the problem. Please suggest me your views or how i can proceed with this problem. It will be really great if i get some help. Thanks a lot.

Thanks and Regards,
Douglas Kent
Ranch Hand

Joined: Oct 06, 2000
Posts: 171
My suggestion would be check the date format in the creation of the DailyRollingFileAppender, as in: new DailyRollingFileAppender(pl, LogFile_PathAndName, "'_'yyMMdd'.log
I agree. Here's the link:
subject: Problem with DailyRollingFileAppender
It's not a secret anymore!