code: public void activateOptions() {
      super.activateOptions();
  
      PatternConverter dtc = getDatePatternConverter();
  
      if (dtc == null) {
        throw new IllegalStateException(
          "FileNamePattern [" + getFileNamePattern()
          + "] does not contain a valid date format specifier");
      }
  
      long n = System.currentTimeMillis();
      StringBuffer buf = new StringBuffer();
      formatFileName(new Date(n), buf);
      lastFileName = buf.toString();
  
      suffixLength = 0;
  
      if (lastFileName.endsWith(".gz")) {
        suffixLength = 3;
      } else if (lastFileName.endsWith(".zip")) {
        suffixLength = 4;
      }
    }
docs: Prepares instance of use.