Ok, thanks.

But If I use log4cxx::rolling::RollingFileAppender how can I set the file
name and the pattern layout?
If I use  log4cxx::RollingFileAppender I can pass it to the constructor.

In the first one I can set the RollingPolicy and the TriggeringPolicy and in
the second one, I can set the file name and the pattern layout.

On Fri, Sep 17, 2010 at 07:07, Curt Arnold <carn...@apache.org> wrote:

> log4cxx attempts to reproduce the appender set from log4j and log4j has two
> different RollingFileAppender classes, org.apache.log4j.RollingFileAppender
> and org.apache.log4j.rolling.RollingFileAppender.  The latter was developed
> on the abandoned log4j 1.3 development branch, is now included in the extras
> companion to log4j and supports pluggable rollover strategies and triggering
> strategies.
>
> In log4cxx, log4cxx::RollingFileAppender (the analog to
> org.apache.log4j.RollingFileAppender) is implemented by delegation to
> log4cxx::rolling::RollingFileAppender (the analog to
> org.apache.log4j.rolling.RollingFileAppender).
>  log4cxx::rolling::RollingFileAppender is the more general class and should
> be used unless you are porting configurations that used
> org.apache.log4j.RollingFileAppender.
>
>
> On Sep 15, 2010, at 4:25 AM, Fabian Jacquet wrote:
>
> > Hi all,
> >
> > I need to configure a RollingFileAppender in the code of the program.
> > But I see 2 definitions of RollingFileAppender
> (log4cxx::RollingFileAppender and log4cxx::rolling::RollingFileAppender)
> >
> > I don't know which definition to use. Do you know why we have 2 different
> definitions? And which to use?
>
>

Reply via email to