logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jathy <xuehai....@yahoo.com>
Subject Re: TimeBasedRollingPolicy does not work in RollingFileAppender
Date Fri, 10 Oct 2008 09:54:33 GMT



Jathy wrote:
> 
> I used TimeBasedRollingPolicy to rollover log file every day but it did
> not work. No files was generated. My configuration file is shown below,
> 
> <?xml version="1.0" encoding="UTF-8" ?> 
> <log4j:configuration xmlns:log4j='http://logging.apache.org/'
> debug="true">
>   <appender name="ROLLING"
> class="org.apache.log4j.rolling.RollingFileAppender">
>             <rollingPolicy
> class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
>               
>               
>             </rollingPolicy>
>     <layout class="org.apache.log4j.PatternLayout">
>       
>     </layout>
>     
>   </appender>
>   <root>
>     <level value="info"/>
>     <appender-ref ref="ROLLING"/>
>   </root>
> </log4j:configuration>
> 
> And in the code, I used the following codes to initialized the log4cxx:
> 
> string strXmlConfig = "logging.xml";
> log4cxx::xml::DOMConfigurator::configure(strXmlConfig);
> log4cxx::LoggerPtr pLogger = log4cxx::Logger::getRootLogger();
> 
> What's wrong about my configuration or codes? Thank you.
> 

The ploblem has been fixed, thanks.

-- 
View this message in context: http://www.nabble.com/TimeBasedRollingPolicy-does-not-work-in-RollingFileAppender-tp19913027p19915331.html
Sent from the Log4cxx - Users mailing list archive at Nabble.com.


Mime
View raw message