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

Add cleanup to TimeBasedRollingPolicy

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • None
    • logback-core
    • None
    • Operating System: All
      Platform: All

    • 77

    Description

      The TimeBasedRollingPolicy class is very convenient for complex applications, but it still leaves us with the task of manually deleting old log files. It would be very nice if, like FixedWindowRollingPolicy, TimeBasedRollingPolicy had an option to keep only up to n time windows.

      E.g., I'd like to configure LOGBack to keep the last 30 days (or last 3 months, rotated monthly) of files with the TimeBasedRollingPolicy. I could use the FixedWindowROollingPolicy for this, but it's more cumbersome and I prefer to have the date in the file name.

      Software should do the tricky stuff once for everybody to reuse. Thanks again for the excellent LOGBack, I can't rave enough about how much an improvement it, along with SLF4J, is.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            agerwe@acxiom.com Andy Gerweck
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: