Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-118

RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.10
    • Component/s: Appenders
    • Labels:
      None
    • Environment:
      Windows 2003 / Microsoft .NET Framework 2.0

      Description

      When using the an appender configuration like

      <appender name="InfoFile" type="log4net.Appender.RollingFileAppender">
      <file value="info.log" />
      <appendToFile value="false" />
      <encoding value="utf-8" />
      <countDirection value="1" />
      <maximumFileSize value="1MB" />
      <maxSizeRollBackups value="3" />
      <staticLogFileName value="false" />
      <rollingStyle value="Size" />
      <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%utcdate

      {yyyy-MM-dd HH:mm:ss.ff}

      Z [%thread] %-5level %logger - %message%newline" />
      </layout>
      </appender>

      results in the following error message when the application is started the second time:

      log4net:ERROR RollingFileAppender: INTERNAL ERROR. Append is False but OutputFile [V:\...\bin\Debug\info.log.0] already exists.

        Attachments

        1. LOG4NET-118.patch
          2 kB
          Dominik Psenner

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pg Patrick Gautschi
            • Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: