I'm using the timebased rolling policy fine with CVS head from like
January(tarball on the website won't work) here is what I used. Yeah
and only the XML based configuration can use the timebasedrolling
policy took me a while to figure that out :(

  <appender name="main" class="org.apache.log4j.RollingFileAppender"
append="false">
     <rollingPolicy class="org.apache.log4j.TimeBasedRollingPolicy">
      <param name="FileNamePattern" value="lobbyserver.%d.log"/>
    </rollingPolicy>

    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{%y.%m.%d %H:%M:%S}
[%5t] %5p %c - %n%m%n%n"/>
    </layout>
  </appender>


On 3/15/06, Rainer Schuetze <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've tried to get the TimeBasedRollingPolicy running. So I was wondering
> why the DOMConfigurator couldn't create an Instance for the
> TimeBasedRollingPolicy.
>
> I've debugged my App step by step and figured out, that the
> TimeBasedRollingPolicy was declared as an Abstract class. What is the
> reason for this?
> However, I changed the the declaration:
>            //DECLARE_ABSTRACT_LOG4CXX_OBJECT(TimeBasedRollingPolicy)
>           DECLARE_LOG4CXX_OBJECT(TimeBasedRollingPolicy)
> and failed at the Date pattern. In the jDOC, the example is documented as:
> <param name="fileNamePattern" value="./log/test1-{yyyy-MM}"/>
> but I needed to mark the pattern as a date with [%d]:
> <param name="fileNamePattern" value="./log/test1-%d{yyyy-MM}"/>
> At the current state of Log4CXX, the Date format pattern is required.
>
> Regards
>
> Rainer
>
> --
> Rainer Schuetze
>
> i3mainz - Fachhochschule Mainz
> Holzstrasse 36
> 55116 Mainz
> Germany
>
> Tel: +49 (0)6131 2859 682
> Fax: +49 (0)6131 2859 699
> [EMAIL PROTECTED]
> http://www.i3mainz.fh-mainz.de
>
>



--
If video games influenced youth, all the kids who played Pac-Man would
spend all their time walking around in dark rooms listening to
electronic music and munching on magic pills.

Reply via email to