Until I hear how to configure with the default initialization, I am using the DOMConfigurator directly. My log4cxx.xml contains a snippet from the RollingFileAppender documentation:

<appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender"> <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
           <param name="FileNamePattern" value="log.d{yyyy-MM}.xml"/>
       </rollingPolicy>

       <layout class="org.apache.log4j.XMLLayout"/>
   </appender>

but the DOMConfigurator chokes on the rollingPolicy:

log4cxx: Parsing rolling policy of class: "org.apache.log4j.rolling.TimeBasedRollingPolicy"
log4cxx: Setting option name=[FileNamePattern], value=[log.d{yyyy-MM}.xml]
log4cxx: Could not create the RollingPolicy. Reported error follows.
log4cxx: Illegal state

I'm guessing it is the XML snippet that is the culprit, as it has other issues (<root">). Does anyone have a working example input? Or is this just a bug in the code?


Anm

Reply via email to