Hi, I am using log4j1.2.15 in weblogic8.1 I need RollingFileAppender or DailyRollingFileAppender for my application.
here is the log4j xml where in tried both <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration debug="false" xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="BASE" class="org.apache.log4j.RollingFileAppender"> <param name="File" value="/sangeetha/l2p/logs/base_log4j.log" /> <param name="MaxFileSize" value="500KB"/> <param name="MaxBackupIndex" value="5"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%d{ISO8601}] %-5p %m %n" /> </layout> </appender> <appender name="SYSTEM" class="org.apache.log4j.DailyRollingFileAppender"> <param name="File" value="/sangeetha/l2p/logs/system_log4j.log" /> <param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/> <param name="Append" value="true"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%d{ISO8601}] %-5p %m %n" /> </layout> </appender> <logger name="com.bms.l2p.base" additivity="false"> <level value="debug"/> <appender-ref ref="BASE"/> </logger> <logger name="com.bms.l2p.system" additivity="false"> <level value="DEBUG"/> <appender-ref ref="SYSTEM"/> </logger> <!-- setup log4j's root logger --> <!-- --> <root> <level value="DEBUG" /> </root> </log4j:configuration> I have been using log4j for sometime but the simple logs so far only in Tomcat environment. This is the first time I'm trying this. When I tried RFA, it doesn't create backup files. My logs were rolledover and only the latest logs were there. In DFRA the backup files are created only whenever the application is redeployed but not based in the datepattern which I have set to minutes for testing. I saw many threads with these issues but no solution. Can anyone please tell whether this is possible or not? Is this still a bug / issue in log4j? Is there any other way to acheive the above functionality? Thanks, Sangeetha