You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Roman Konovalov <ro...@greenrain.biz> on 2010/12/14 16:54:25 UTC

Log file name duplication

Hi,

 

I got an issue with the duplicated log file names - I get two log files. For
example, on December 14 I got these two files:

1). 2010-12-14 My App.log

2). 2010-12-14 My App.log2010-12-14 My App.log

 

Do you have any suggestion what is wrong with my settings? I use the one
below. Thanks in advance.

 

  <log4net>

    <appender name="My App" type="log4net.Appender.RollingFileAppender">

      <file value="Application Log\"/>

      <appendToFile value="true"/>

      <rollingStyle value="Date"/>

             <datePattern value="yyyy-MM-dd' My App.log'" />

             <maxSizeRollBackups value="10" /> <!--This property is ignored
for Rolling Style Date-->

             <maximumFileSize value="1024KB"/> <!--This property is ignored
for Rolling Style Date-->

      <staticLogFileName value="false" />

             <layout type="log4net.Layout.PatternLayout">

        <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss} [%thread]
%-5level %C{1}.%M (%F:%L) - %m%n" />

      </layout>

    </appender>

 

    <root>

      <!--Level value would always be ALL as all appenders will inherit this
value. Root's level is the lowest level any appender will have.-->

      <level value="ALL" />

      <appender-ref ref="Greenrain Connect" />

    </root>

  </log4net>

 

 

Best regards,

Roman