"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DirectWriteRolloverStrategy.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

DirectWriteRolloverStrategy.java  (apache-log4j-2.11.1-src):DirectWriteRolloverStrategy.java  (apache-log4j-2.11.2-src)
skipping to change at line 239 skipping to change at line 239
/** /**
* Index for most recent log file. * Index for most recent log file.
*/ */
private final int maxFiles; private final int maxFiles;
private final int compressionLevel; private final int compressionLevel;
private final List<Action> customActions; private final List<Action> customActions;
private final boolean stopCustomActionsOnError; private final boolean stopCustomActionsOnError;
private volatile String currentFileName; private volatile String currentFileName;
private int nextIndex = -1; private int nextIndex = -1;
private final PatternProcessor tempCompressedFilePattern; private final PatternProcessor tempCompressedFilePattern;
private volatile boolean usePrevTime = false;
/** /**
* Constructs a new instance. * Constructs a new instance.
* *
* @param maxFiles The maximum number of files that match the date portion o f the pattern to keep. * @param maxFiles The maximum number of files that match the date portion o f the pattern to keep.
* @param customActions custom actions to perform asynchronously after rollo ver * @param customActions custom actions to perform asynchronously after rollo ver
* @param stopCustomActionsOnError whether to stop executing asynchronous ac tions if an error occurs * @param stopCustomActionsOnError whether to stop executing asynchronous ac tions if an error occurs
* @deprecated Since 2.9 Added tempCompressedFilePatternString parameter * @deprecated Since 2.9 Added tempCompressedFilePatternString parameter
*/ */
@Deprecated @Deprecated
skipping to change at line 326 skipping to change at line 327
final int fileIndex = eligibleFiles.size() > 0 ? (nextIndex > 0 ? ne xtIndex : eligibleFiles.size()) : 1; final int fileIndex = eligibleFiles.size() > 0 ? (nextIndex > 0 ? ne xtIndex : eligibleFiles.size()) : 1;
final StringBuilder buf = new StringBuilder(255); final StringBuilder buf = new StringBuilder(255);
manager.getPatternProcessor().formatFileName(strSubstitutor, buf, tr ue, fileIndex); manager.getPatternProcessor().formatFileName(strSubstitutor, buf, tr ue, fileIndex);
final int suffixLength = suffixLength(buf.toString()); final int suffixLength = suffixLength(buf.toString());
final String name = suffixLength > 0 ? buf.substring(0, buf.length() - suffixLength) : buf.toString(); final String name = suffixLength > 0 ? buf.substring(0, buf.length() - suffixLength) : buf.toString();
currentFileName = name; currentFileName = name;
} }
return currentFileName; return currentFileName;
} }
@Override
public void clearCurrentFileName() {
currentFileName = null;
}
/** /**
* Performs the rollover. * Performs the rollover.
* *
* @param manager The RollingFileManager name for current active log file. * @param manager The RollingFileManager name for current active log file.
* @return A RolloverDescription. * @return A RolloverDescription.
* @throws SecurityException if an error occurs. * @throws SecurityException if an error occurs.
*/ */
@Override @Override
public RolloverDescription rollover(final RollingFileManager manager) throws SecurityException { public RolloverDescription rollover(final RollingFileManager manager) throws SecurityException {
LOGGER.debug("Rolling " + currentFileName); LOGGER.debug("Rolling " + currentFileName);
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)