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

SizeAndTimeBasedRollingPolicy discards log data

    XMLWordPrintable

Details

    Description

      RollingFileAppender when used with SizeAndTimeBasedRollingPolicy disards during log rotation first file that should have been archived. This happens only if file rotates by time before first rotating by size

      Attached is app that simply does some info and debug logging and logback config file that logs everything to one file and info to other. Logs rotate at 100kB or after a minute. fast log keeps exceeding file size limit so it is archived properly. slow log does not exceed the file size limit and when minute changes it simply gets deleted and starts fresh. With next minute change it is properly archived though.

      Since log rotation is usually set for a day this can mean loss of day worth of logging.

      Attachments

        1. logback.xml
          2 kB
        2. logback-richcar.xml
          2 kB
        3. Rotfail.java
          0.5 kB

        Activity

          People

            logback-dev Logback dev list
            tonowie Anton Wiedermann
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: