logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vincentw <vincentwong...@yahoo.com>
Subject Re: RollingFileAppender Not rolling over
Date Thu, 02 Nov 2006 17:46:06 GMT

Yes it does work when using standard layout class.


James Stauffer wrote:
> 
> Does it work if you use the standard layout class?
> 
> On 11/1/06, vincentw <vincentwong123@yahoo.com> wrote:
>>
>> Hi, I'm having trouble with thr RFA not rollingover.  Here is my config
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>>
>> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
>> debug="false">
>>
>>   <!-- ==========Appenders========== -->
>>   <!-- Define asyncAppender -->
>>   <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
>>         <appender-ref ref="STDOUT"/>
>>         <appender-ref ref="R"/>
>>   </appender>  <!-- Define R; Rolling file logger -->
>>   <appender name="R" class="org.apache.log4j.RollingFileAppender">
>>       <param name="File" value="logs/adminlog.txt"/>
>>       <param name="MaxFileSize" value="4KB"/>
>>       <param name="MaxBackupIndex" value="3"/>
>>       <layout class="xxxx.aLayout">
>>       </layout>
>>   </appender>
>>
>>
>>   <!-- ==========Setup the Root category========== -->
>>   <!-- rules for logging DEBUG<INFO<WARN<ERROR<FATAL. -->
>>   <root>
>>         <priority value = "info"/>
>>     <appender-ref ref="ASYNC"/>
>>   </root>
>> </log4j:configuration>
>>
>> I'm running into this problem after I have extended the Layout class.  I
>> extended the layout class so I can have header info in each of the log
>> files.  If I used
>> <layout class="org.apache.log4j.PatternLayout">
>>   <param name="ConversionPattern"
>>     value="%d{yyyy-MM-dd HH:mm:ss} %-17X{ipAddress} [%t] [%p] - %m%n"/>
>>
>> instead I have no rollover problems.
>>
>> Now what I see is I just get one file of 4KB rolling over onto itself,
>> but I
>> get the header info.
>>
>> Any ideas??
>>
>> Thanks in advance
>> --
>> View this message in context:
>> http://www.nabble.com/RollingFileAppender-Not-rolling-over-tf2556156.html#a7123228
>> Sent from the Log4j - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
> 
> 
> -- 
> James Stauffer        http://www.geocities.com/stauffer_james/
> Are you good? Take the test at http://www.livingwaters.com/good/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/RollingFileAppender-Not-rolling-over-tf2556156.html#a7141878
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message