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

FilenamePattern used to TimeBasedArchiveRemover is limited for 999 files

    XMLWordPrintable

Details

    Description

      TimeBasedRollingPolicy uses TimeBasedArchiveRemover and FileNamePattern.toRegexForFixedDate to match the files to be deleted.
      The pattern is using a regex

      "(\\d{1,3})"
      

      for IntegerTokenConverter.

      If I have more than 1k files, will be cleaning just the first 999 files and ignore the others.
      Ex:

      access.2016-05-09.1000.log.gz
      access.2016-05-09.1001.log.gz
      access.2016-05-09.1002.log.gz
      access.2016-05-09.1003.log.gz
      

      p.s toRegex has just 2 digits and could have the same issue.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            diegofurtado Diego Furtado
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: