Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-195 SizeAndTimeBasedFNATP will overwrite previous logging files when File property is set at RollingFileAppender
  3. LOGBACK-199

When your application is stopped and restarted, logging will not continue at the correct location, i.e. at the largest index number for the current period.

    XMLWordPrintable

Details

    • Icon: Sub-task Sub-task
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • logback-core
    • None

    Description

      As the online manual says (http://logback.qos.ch/manual/appenders.html) :
      "When your application is stopped and restarted, logging will continue at the correct location, i.e. at the largest index number for the current period.".
      This mean that the following steps occured :

      • You have a log.trc current log file
      • When rolling, as the <fileNamePattern> defined is <fileNamePattern>log_%i.log.zip</fileNamePattern>, archived log filed are created with the index %i starting at Zero.
      • If current index is 3 when application is stopped, then restarting index is 4 and next archived log file to be created is log_4.log.zip

      But this does not occure. Unfortunately the new archived log file with index equals to 4 is not created and you see a file with a weird name log_tmp<nanosseconds>.log created.
      The reason has to be linked to LBCORE-131, current period index is not properly managed then when system is restarted this index is newly set to Zero and not 4.
      As system tries to create log_0.log.zip file, system does test that this file exists and stops.
      Temporary file tmp<nanos> which has to be saved as archived log file stays created (should have been deleted after archived log file creation successed).

      As LBCORE-131 gives a fix, this fix should be improve in order to test also if current index period has to be increase because archived lof file in COMPRESS MODE already exists.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            gonzalez David Gonzalez
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: