Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-71

After a restart SizeAndTimeBasedFNATP uses incorrect sequence numbers for rollover files if compression is enabled

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • logback-core
    • None

    Description

      To reproduce this issue you can use a setup similar to the one used for LBCORE-131, but then use a filename pattern like "log.%d

      {yyyy-MM-dd}

      .%i.txt.gz" for the RollingPolicy.
      This works fine as long as you don't restart the application that is doing the logging. The following files are created:

      log.2010-08-02.0.txt.gz
      log.2010-08-02.1.txt.gz
      log.2010-08-02.2.txt     ( = active log file)
      

      However, after a restart the following happens:

      log.2010-08-02.0.txt.gz
      log.2010-08-02.1.txt.gz
      log.2010-08-02.1.txt     (!!)
      log.2010-08-02.2.txt.gz
      log.2010-08-02.3.txt.gz
      log.2010-08-02.4.txt    (the active log file)
      

      So there are now two versions of the logfile with index 1: one zipped and one unzipped. They do not contain the same messages!
      Also the order of the messages in these logfiles is not what I expected. After the restart logback will first create the 'log.2010-08-02.1.txt' file and after that it will fill the existing 'log.2010-08-02.2.txt' file to the rollover size.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            frbo Frank Bos
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: