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,
posted 7 years ago
My suggestion would be check the date format in the creation of the DailyRollingFileAppender, as in: new DailyRollingFileAppender(pl, LogFile_PathAndName, "'_'yyMMdd'.log