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

RollingFileAppender log.1, log.2 are not being rolled by Date

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 1.2.10
    • Component/s: Appenders
    • Labels:
      None
    • Environment:
      .NET 2005, Microsoft Windows Server 2003

      Description

      I am using log4net.dll v1.2.0.30714. My RollingFileAppender rolls only the .log file every day but ignores the log.1, log.2 etc...
      This is only happening on my Web Service. My Windows Service project does not have this problem. It works fine with the same log4net.dll version.
      I credted the log4net.txt. I am attaching a section of it below:
      Note: By looking at the RollingFileAppeder.cs, If StaticLogFileName=true, "it is from a different date period" should not appear. Am I wrong on this?

      log4net: DOMConfigurator: Loading Appender [RollingLogFileAppender] type: [log4net.Appender.RollingFileAppender]
      log4net: DOMConfigurator: Setting Property [File] to String value [D:\Apps\Agents\GFS\Strategyware\EnterpriseMQServices\Logs\Activity.log]
      log4net: DOMConfigurator: Setting Property [AppendToFile] to Boolean value [True]
      log4net: DOMConfigurator: Setting Property [DatePattern] to String value [.MM-dd-yyyy".log"]
      log4net: DOMConfigurator: Setting Property [RollingStyle] to RollingMode value [Composite]
      log4net: DOMConfigurator: Setting Property [MaxSizeRollBackups] to Int32 value [20]
      log4net: DOMConfigurator: Setting Property [MaximumFileSize] to String value [15MB]
      log4net: DOMConfigurator: Setting Property [StaticLogFileName] to Boolean value [True]
      log4net: DOMConfigurator: Setting Property [ConversionPattern] to String value [%d [%t] %-5p %c [%x] - %m%n]
      log4net: DOMConfigurator: Setting Property [Layout] to object [log4net.Layout.PatternLayout]
      log4net: RollingFileAppender: Type = [0], r0 = [.12-31-1969.log], r1 = [.12-31-1969.log]
      log4net: RollingFileAppender: Type = [1], r0 = [.12-31-1969.log], r1 = [.12-31-1969.log]
      log4net: RollingFileAppender: Type = [2], r0 = [.12-31-1969.log], r1 = [.01-01-1970.log]
      log4net: RollingFileAppender: Searching for existing files in [D:\Apps\Agents\GFS\Strategyware\EnterpriseMQServices\Logs]
      log4net: RollingFileAppender: Ignoring file [activity.log.1] because it is from a different date period
      log4net: RollingFileAppender: Ignoring file [activity.log.2] because it is from a different date period
      log4net: RollingFileAppender: Ignoring file [activity.log.3] because it is from a different date period
      log4net: RollingFileAppender: Ignoring file [activity.log.4] because it is from a different date period

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gyazgan Gulden Yazgan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: