logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangeetha Priya S" <ssangeethapr...@gmail.com>
Subject RollingFileAppender & DailyRollingFileAppender does not create backup
Date Fri, 21 Sep 2007 15:32:56 GMT

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"
    <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" />

    <appender name="SYSTEM"
        <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" />

    <logger name="com.bms.l2p.base" additivity="false">
        <level value="debug"/>
        <appender-ref ref="BASE"/>

    <logger name="com.bms.l2p.system" additivity="false">
        <level value="DEBUG"/>
        <appender-ref ref="SYSTEM"/>

    <!-- setup log4j's root logger -->

    <!--                           -->
        <level value="DEBUG" />


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


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message