logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pvphuc <pcpvp...@yahoo.com.vn>
Subject Need help about RollingLogfileAppender.
Date Tue, 12 Dec 2006 03:46:30 GMT

I have read document about Log4Net and I have some info about
RollingLogFileAppender : The new file will be created depend on the size or
date in Config file.

Is it right ?

If it is right, I configured my file Log4Net.Config : 

<appender name="RollingLogFileAppender"    
        type="log4net.Appender.RollingFileAppender">

    <file value="c:/logs/log.txt" />

    <AppendToFile value="true" />
    <datePattern value="yyyyMMdd" />
    <MaximumFileSize value="1KB" />
    <MaxSizeRollBackups value="10" />
    <rollingStyle value="Size" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%d [%t] %-5p %c [%x] - %m%n" />
    </layout>
</appender>

I think a new file will be created in c:/logs with  name is log.txt when
FileSize is over 1KB. If it is created, it it overwrite the old file ?

If I want to create log file everyday, I will set <RollingStyle value="Date"
/>.

Please help me more understand about that !

Thanks in advance !

Phuc

-- 
View this message in context: http://www.nabble.com/Need-help-about-RollingLogfileAppender.-tf2805347.html#a7826900
Sent from the Log4net - Users mailing list archive at Nabble.com.


Mime
View raw message