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

Set daily rollovers with separated date formatting in the fileNamePattern

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I want to set up a daily rollover with the following fileNamePattern:

      • /path/to/rolling_logs/%d{yyyy-MM,aux}/%d{dd}/log_name.%i.log

      When I try this, I get an error explaining, 'The date format in FileNamePattern will result in collisions in the names of archived log files.' This format would not actually result in naming collisions. The only workaround I've found is to include the full date as part of the filename, e.g.:

      • /path/to/rolling_logs/%d{yyyy-MM,aux}/%d{dd,aux}/log_name.%d.%i.log

      If there is some other workaround that I'm not aware of, please advise.

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              itsbehind Sean Nelson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: