@Override public void start() { super.start(); archiveRemover = new TimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { // we depend on certain fields having been initialized // in super.start() super.start(); archiveRemover = createArchiveRemover(); archiveRemover.setContext(context); // we need to get the correct value of currentPeriodsCounter. // usually the value is 0, unless the appender or the application // is stopped and restarted within the same period String regex = tbrp.fileNamePattern.toRegexForFixedDate(dateInCurrentPeriod); String stemRegex = FileFilterUtil.afterLastSlash(regex); computeCurrentPeriodsHighestCounterValue(stemRegex); started = true; }
@Override public void start() { super.start(); archiveRemover = new DefaultArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { super.start(); archiveRemover = new TimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { super.start(); archiveRemover = new TimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { super.start(); archiveRemover = new TimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { super.start(); if (!super.isErrorFree()) return; if(tbrp.fileNamePattern.hasIntegerTokenCOnverter()) { addError("Filename pattern ["+tbrp.fileNamePattern+"] contains an integer token converter, i.e. %i, INCOMPATIBLE with this configuration. Remove it."); return; } archiveRemover = new TimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { super.start(); if (!super.isErrorFree()) return; if(tbrp.fileNamePattern.hasIntegerTokenCOnverter()) { addError("Filename pattern ["+tbrp.fileNamePattern+"] contains an integer token converter, i.e. %i, INCOMPATIBLE with this configuration. Remove it."); return; } archiveRemover = new TimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { super.start(); if (!super.isErrorFree()) return; if(tbrp.fileNamePattern.hasIntegerTokenCOnverter()) { addError("Filename pattern ["+tbrp.fileNamePattern+"] contains an integer token converter, i.e. %i, INCOMPATIBLE with this configuration. Remove it."); return; } archiveRemover = new TimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { // we depend on certain fields having been initialized // in super.start() super.start(); archiveRemover = createArchiveRemover(); archiveRemover.setContext(context); // we need to get the correct value of currentPeriodsCounter. // usually the value is 0, unless the appender or the application // is stopped and restarted within the same period String regex = tbrp.fileNamePattern.toRegexForFixedDate(dateInCurrentPeriod); String stemRegex = FileFilterUtil.afterLastSlash(regex); computeCurrentPeriodsHighestCounterValue(stemRegex); started = true; }
@Override public void start() { // we depend on certain fields having been initialized // in super.start() super.start(); archiveRemover = new SizeAndTimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); // we need to get the correct value of currentPeriodsCounter. // usually the value is 0, unless the appender or the application // is stopped and restarted within the same period String regex = tbrp.fileNamePattern.toRegex(dateInCurrentPeriod); String stemRegex = FileFilterUtil.afterLastSlash(regex); computeCurrentPeriodsHighestCounterValue(stemRegex); started = true; }
@Override public void start() { // we depend on certain fields having been initialized // in super.start() super.start(); archiveRemover = new SizeAndTimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); // we need to get the correct value of currentPeriodsCounter. // usually the value is 0, unless the appender or the application // is stopped and restarted within the same period String regex = tbrp.fileNamePattern.toRegex(dateInCurrentPeriod); String stemRegex = FileFilterUtil.afterLastSlash(regex); computeCurrentPeriodsHighestCounterValue(stemRegex); started = true; }
@Override public void start() { @SuppressWarnings("rawtypes") DateTokenConverter dtc = rollingPolicy.fileNamePattern.getPrimaryDateTokenConverter(); if (dtc == null) { throw new IllegalStateException("FileNamePattern [" + rollingPolicy.fileNamePattern.getPattern() + "] does not contain a valid DateToken"); } rc = new DataLogRollingCalendar(); rc.init(dtc.getDatePattern(), rollingPolicy.getRollingInterval()); addInfo("The date pattern is '" + dtc.getDatePattern() + "' from file name pattern '" + rollingPolicy.fileNamePattern.getPattern() + "'."); rc.printPeriodicity(this); setDateInCurrentPeriod(new Date(getCurrentTime())); if (rollingPolicy.getParentsRawFileProperty() != null) { File currentFile = new File(rollingPolicy.getParentsRawFileProperty()); if (currentFile.exists() && currentFile.canRead()) { setDateInCurrentPeriod(new Date(currentFile.lastModified())); } } addInfo("Setting initial period to " + dateInCurrentPeriod); computeNextCheck(); archiveRemover = new TimeBasedArchiveRemover(rollingPolicy.fileNamePattern, rc); archiveRemover.setContext(context); started = true; }
@Override public void start() { // we depend on certain fields having been initialized // in super.start() super.start(); archiveRemover = new SizeAndTimeBasedArchiveRemover(tbrp.fileNamePattern, rc); archiveRemover.setContext(context); // we need to get the correct value of currentPeriodsCounter. // usually the value is 0, unless the appender or the application // is stopped and restarted within the same period if (tbrp.getParentsRawFileProperty() == null) { String regex = tbrp.fileNamePattern.toRegex(dateInCurrentPeriod); String stemRegex = FileFilterUtil.afterLastSlash(regex); computeCurrentPeriodsHighestCounterValue(stemRegex); } started = true; }
@Override public void start() { super.start(); if (!super.isErrorFree()) { return; } if (tbrp.fileNamePattern.hasIntegerTokenCOnverter()) { addError("Filename pattern [" + tbrp.fileNamePattern + "] contains an integer token converter, i.e. %i, INCOMPATIBLE with this configuration. Remove it."); return; } archiveRemover = new TimeBasedArchiveRemover(tbrp.fileNamePattern, rc, new DefaultFileProvider()); archiveRemover.setContext(context); started = true; }
archiveRemover.setContext(context);
archiveRemover.setContext(context);
archiveRemover.setContext(context);
archiveRemover.setContext(context);