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

RollingFileAppender.RollOverIfDateBoundaryCrossing doesn't take PreserveLogFileNameExtension into account

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.11
    • None
    • Appenders
    • None
    • Windows 7

    Description

      If a roll over is needed for crossing a date boundary since the last run, the m_scheduledFilename variable is set up based on the last write time of the log file. However, if PreserveLogFileNameExtension is set to true, this extension is NOT preserved, instead this option is ignored. This leads to wrong backup file names.As an example, if the log filename is file.log and the last write time of the file is 2012-04-30, the generated filename is file.log.2012-04-30 instead of file.2012-04-30.log as it should be.

      Steps to reproduce: set up a RollingFileAppender, set it's PreserveLogFileNameExtension to true and have it RollOverIfDateBoundaryCrossing...

      Attachments

        1. LOG4NET-337.patch
          2 kB
          terryh

        Issue Links

          Activity

            People

              nachbarslumpi Dominik Psenner
              wexman Jens Weiermann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: