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 Delfina Concepcion <c_...@hotmail.com> on 2003/09/23 15:23:33 UTC
Configuring a wrapper class for rolling policies
Hi all!
I.m using a wrapper class (i.e
org.apache.log4j.rolling.MyTimeBasedRollingPolicy) to performance an
specific rollingPolicy for my purpose.
Is there any way to configure it in log4j properties file?
i tried something like :
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.rolling.RollingFileAppender
log4j.appender.A1.RollingPolicy=org.apache.log4j.rolling.MyTimeBasedRollingPolicy
log4j.appender.A1.RollingPolicy.ActiveLogFile=my_log.txt
log4j.appender.A1.RollingPolicy.FileNamePattern='.'yyyy-MM-dd-HH-mm
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
but it doesn´t work.
Thanks in advance
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: Configuring a wrapper class for rolling policies
Posted by Ceki Gülcü <ce...@qos.ch>.
Composite components such as org.apache.log4j.rolling.RollingFileAppender
must be configured using DOMConfigurator or JoranConfigurator.
Note that DOMConfigurator is deprecated in 1.3 and will be replaced with
JoranConfigurator. However, JoranConfigurator is not yet ready. (Of course
1.3 is not either.)
At 03:23 PM 9/23/2003 +0200, you wrote:
>Hi all!
>I.m using a wrapper class (i.e
>org.apache.log4j.rolling.MyTimeBasedRollingPolicy) to performance an
>specific rollingPolicy for my purpose.
>Is there any way to configure it in log4j properties file?
>i tried something like :
>
>log4j.rootLogger=DEBUG, A1
>log4j.appender.A1=org.apache.log4j.rolling.RollingFileAppender
>log4j.appender.A1.RollingPolicy=org.apache.log4j.rolling.MyTimeBasedRollingPolicy
>log4j.appender.A1.RollingPolicy.ActiveLogFile=my_log.txt
>log4j.appender.A1.RollingPolicy.FileNamePattern='.'yyyy-MM-dd-HH-mm
>log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>
>but it doesn´t work.
>Thanks in advance
--
Ceki Gülcü
For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
import org.apache.Facetime;
ApacheCon US 2003, 18-21 November http://apachecon.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org