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

preserveLogFileNameExtension is not considered when rolling over time after an application restart

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.9
    • 1.2.12
    • Appenders
    • None

    Description

      Consider this configuration, with V 1.2.11 or trunk:

      <file value="log.log" />
      <appendToFile value="true" />
      <rollingStyle value="Composite" />
      <datePattern value=".yyyyMMdd-HHmm" />
      <staticLogFileName value="true" />
      <preserveLogFileNameExtension value="true" />

      • Start an application (a verbose one, preferably) with it.
      • Kill it immediately.
        Log directory now looks like this

        log.log
      • Wait until we are in another minute
      • Start application again
      • Kill it immediately
        Log directory now looks like this

        log.log
        log.log.20130122-2042

      Didn't we say we want to preserveLogFileNameExtension?
      Shouldn't the file name of the file rolled over be "log.20130122-2042.log"?
      If the application weren't killed and restarted in another period,
      everything were correct.

      This happens when rolling over an old log file from a previous run upon application start. The line of this patch fixes it.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment