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

FileNamePattern, parentheses "( )", and archive remover

    XMLWordPrintable

Details

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

    Description

      A rolling file appender, or any of its children, should allow parentheses within the file name. The toRegex and toRegexForFixedDate methods of the FileNamePattern, used for the purposes of removing old files, should escape parentheses if they come from a LiteralConverter (see lines 169 and 188 within FileNamePattern.java). If this is not done then the archive remover is unable to find files to remove.

      I know the easy solution would be to not use parentheses in the file names; however, it is a relatively easy fix to just tack on .replace("(","\\(").replace(")","
      )")

      Attachments

        Activity

          People

            logback-dev Logback dev list
            nmccloud Kenneth Gendron
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: