logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edwin Rios (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4NET-468) Problem when use "PreserveLogFileNameExtension=true" and "CountDirection=0"
Date Tue, 14 Jul 2015 19:21:05 GMT
Edwin Rios created LOG4NET-468:

             Summary: Problem when use "PreserveLogFileNameExtension=true" and "CountDirection=0"
                 Key: LOG4NET-468
                 URL: https://issues.apache.org/jira/browse/LOG4NET-468
             Project: Log4net
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2.13
         Environment: Windows Server 2003
            Reporter: Edwin Rios
            Priority: Minor

I was using the Log4Net 1.2.10 (Framework 2.0) and I needed to use "CountDirection" property
but also I needed to have the same file extension, but in this version the backup file name
is like "xxxx.log.1". So, I searched and found that the version 1.2.13 have the "PreserveLogFileNameExtension"
property, so I decided to test it.

But I found that when I use the "PreserveLogFileNameExtension = true" and  the "CountDirection
= 0", the "CountDirection" does not increment  the name of the backup file, only until ONE.

The xml in web.config looks like this:
      <!--Log AplicaciĆ³n-->
      <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender,log4net">
        <param name="File" value="./logs/777_Trace" />
        <param name="AppendToFile" value="true" />
        <param name="RollingStyle" value="Composite" />
        <param name="DatePattern" value="_yyyy-MM-dd'.log'" />
        <param name="StaticLogFileName" value="false" />
        <param name="CountDirection" value="0" />
        <param name="PreserveLogFileNameExtension" value="true" />
        <maximumFileSize value="1KB"/>
        <maxSizeRollBackups value="20"/>
        <layout type="log4net.Layout.PatternLayout,log4net">
          <param name="ConversionPattern" value="%date [%thread] %-5level %logger - %message%newline"
      <level value="DEBUG" />
    <!-- log only messages of level DEBUG or above in the package specified below -->
    <logger name="logAplicacion">
      <level value="DEBUG"/>
      <appender-ref ref="RollingLogFileAppender"/>

    <logger name="getWebRequest">
      <level value="DEBUG"/>

    <logger name="getWebService">
      <level value="DEBUG"/>

    <logger name="dbRequest">
      <level value="DEBUG" />

    <logger name="dbInputForm">
      <level value="DEBUG" />
    <logger name="recordCapture">
      <level value="DEBUG" />

This message was sent by Atlassian JIRA

View raw message