getLogger().warn(FNP_NOT_SET);
getLogger().warn(SEE_FNP_NOT_SET);
throw new IllegalStateException(FNP_NOT_SET + SEE_FNP_NOT_SET);
}
DateTokenConverter dtc = fileNamePattern.getDateTokenConverter();
if (dtc == null) {
throw new IllegalStateException(
"FileNamePattern [" + fileNamePattern.getPattern()
+ "] does not contain a valid DateToken");
}
int len = fileNamePatternStr.length();
switch(compressionMode) {
case Compress.GZ:
activeFileNamePattern =
new FileNamePattern(fileNamePatternStr.substring(0, len - 3));
break;
case Compress.ZIP:
activeFileNamePattern =
new FileNamePattern(fileNamePatternStr.substring(0, len - 4));
break;
case Compress.NONE:
activeFileNamePattern = fileNamePattern;
}
getLogger().info("Will use the pattern {} for the active file", activeFileNamePattern);
rc = new RollingCalendar();
rc.init(dtc.getDatePattern());
getLogger().debug(
"The date pattern is '{}' from file name pattern '{}'.",
dtc.getDatePattern(), fileNamePattern.getPattern());
rc.printPeriodicity(getLogger());
long n = System.currentTimeMillis();
lastCheck.setTime(n);
nextCheck = rc.getNextCheckMillis(lastCheck);