You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Waldemar Thiel <th...@incenti.pl> on 2004/01/14 13:59:22 UTC

DailyRollingFileAppender - can't set weekly rolling!!?

Hello.

Below log4j XMLconfiguration (see bolded line):

---
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" 
debug="true">
        <appender name="rootFile" 
class="org.apache.log4j.DailyRollingFileAppender">
                <param name="File" value="../ilearn42/log/root.log"/>
                <param name="Append" value="true"/>
                <param name="DatePattern" value="'.'yyyy-ww"/>
                <layout class="org.apache.log4j.PatternLayout">
                        <param name="ConversionPattern" value="%n----- %d 
| p: %-5p : %m"/>
                </layout>
        </appender>
        <root>
                <priority value ="INFO"/>
                <appender-ref ref="rootFile"/>
        </root>
</log4j:configuration>
---

After running application debug info prints:

04/01/14 13:49:22 log4j: Appender [rootFile] to be rolled at start of 
every month.

What is wrong? If pattern is proper the debug message should print: to be 
rolled at start of week

Rgds, Waldek

-----------------------------
Waldemar Thiel
e-mail: thielw@incenti.pl