Repository: logging-log4j2 Updated Branches: refs/heads/master 2ce1a7ff2 -> f56b8c1ab
[LOG4J2-1985] Fix default buffer size to match documentation (from 8102 to 8192 a.k.a. 8KB.) Closes #95. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/a4e217c9 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/a4e217c9 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/a4e217c9 Branch: refs/heads/master Commit: a4e217c9ba3810a4e3677c8ba9a39345586bc4bf Parents: 9ea3ae1 Author: Gary Gregory <[email protected]> Authored: Fri Jul 21 14:11:56 2017 -0700 Committer: Gary Gregory <[email protected]> Committed: Fri Jul 21 14:11:56 2017 -0700 ---------------------------------------------------------------------- .../core/appender/rolling/action/CommonsCompressAction.java | 6 +++--- .../log4j/core/appender/rolling/action/DeleteAction.java | 2 +- .../log4j/core/appender/rolling/action/FileRenameAction.java | 2 +- .../log4j/core/appender/rolling/action/GzCompressAction.java | 4 ++-- .../core/appender/rolling/action/IfAccumulatedFileCount.java | 2 +- .../core/appender/rolling/action/IfAccumulatedFileSize.java | 2 +- .../logging/log4j/core/appender/rolling/action/IfAll.java | 2 +- .../logging/log4j/core/appender/rolling/action/IfAny.java | 2 +- .../logging/log4j/core/appender/rolling/action/IfFileName.java | 6 +++--- .../log4j/core/appender/rolling/action/IfLastModified.java | 4 ++-- .../logging/log4j/core/appender/rolling/action/IfNot.java | 2 +- .../log4j/core/appender/rolling/action/ZipCompressAction.java | 2 +- src/changes/changes.xml | 3 +++ 13 files changed, 21 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java index cc88a4b..6d0c6e2 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java @@ -33,10 +33,10 @@ import org.apache.commons.compress.utils.IOUtils; */ public final class CommonsCompressAction extends AbstractAction { - private static final int BUF_SIZE = 8102; + private static final int BUF_SIZE = 8192; /** - * Compressor name. One of "gz", "bzip2", "xz", "pack200", or "deflate". + * Compressor name. One of "gz", "bzip2", "xz", "pack200" or "deflate". */ private final String name; @@ -140,7 +140,7 @@ public final class CommonsCompressAction extends AbstractAction { @Override public String toString() { - return CommonsCompressAction.class.getSimpleName() + '[' + source + " to " + destination // + return CommonsCompressAction.class.getSimpleName() + '[' + source + " to " + destination + ", deleteSource=" + deleteSource + ']'; } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/DeleteAction.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/DeleteAction.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/DeleteAction.java index fe3da17..76e9b00 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/DeleteAction.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/DeleteAction.java @@ -199,7 +199,7 @@ public class DeleteAction extends AbstractPathAction { @PluginFactory public static DeleteAction createDeleteAction( // @formatter:off - @PluginAttribute("basePath") final String basePath, // + @PluginAttribute("basePath") final String basePath, @PluginAttribute(value = "followLinks") final boolean followLinks, @PluginAttribute(value = "maxDepth", defaultInt = 1) final int maxDepth, @PluginAttribute(value = "testMode") final boolean testMode, http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java index 0ad35af..da3f3d2 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java @@ -174,7 +174,7 @@ public class FileRenameAction extends AbstractAction { @Override public String toString() { - return FileRenameAction.class.getSimpleName() + '[' + source + " to " + destination // + return FileRenameAction.class.getSimpleName() + '[' + source + " to " + destination + ", renameEmptyFiles=" + renameEmptyFiles + ']'; } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressAction.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressAction.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressAction.java index 785f6d5..1c9b082 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressAction.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressAction.java @@ -29,7 +29,7 @@ import java.util.zip.GZIPOutputStream; */ public final class GzCompressAction extends AbstractAction { - private static final int BUF_SIZE = 8102; + private static final int BUF_SIZE = 8192; /** * Source file. @@ -121,7 +121,7 @@ public final class GzCompressAction extends AbstractAction { @Override public String toString() { - return GzCompressAction.class.getSimpleName() + '[' + source + " to " + destination // + return GzCompressAction.class.getSimpleName() + '[' + source + " to " + destination + ", deleteSource=" + deleteSource + ']'; } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileCount.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileCount.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileCount.java index b996a19..b47954f 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileCount.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileCount.java @@ -94,7 +94,7 @@ public final class IfAccumulatedFileCount implements PathCondition { * @return An IfAccumulatedFileCount condition. */ @PluginFactory - public static IfAccumulatedFileCount createFileCountCondition( // + public static IfAccumulatedFileCount createFileCountCondition( // @formatter:off @PluginAttribute(value = "exceeds", defaultInt = Integer.MAX_VALUE) final int threshold, @PluginElement("PathConditions") final PathCondition... nestedConditions) { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileSize.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileSize.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileSize.java index e0de809..7c1d908 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileSize.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAccumulatedFileSize.java @@ -96,7 +96,7 @@ public final class IfAccumulatedFileSize implements PathCondition { * @return An IfAccumulatedFileSize condition. */ @PluginFactory - public static IfAccumulatedFileSize createFileSizeCondition( // + public static IfAccumulatedFileSize createFileSizeCondition( // @formatter:off @PluginAttribute("exceeds") final String size, @PluginElement("PathConditions") final PathCondition... nestedConditions) { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAll.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAll.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAll.java index 88ead53..2eaea8b 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAll.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAll.java @@ -105,7 +105,7 @@ public final class IfAll implements PathCondition { * @return A Composite PathCondition. */ @PluginFactory - public static IfAll createAndCondition( // + public static IfAll createAndCondition( @PluginElement("PathConditions") final PathCondition... components) { return new IfAll(components); } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAny.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAny.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAny.java index b5300ba..6d5841f 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAny.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfAny.java @@ -75,7 +75,7 @@ public final class IfAny implements PathCondition { * @return A Composite PathCondition. */ @PluginFactory - public static IfAny createOrCondition( // + public static IfAny createOrCondition( @PluginElement("PathConditions") final PathCondition... components) { return new IfAny(components); } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfFileName.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfFileName.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfFileName.java index 9eeecf4..1084a77 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfFileName.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfFileName.java @@ -133,10 +133,10 @@ public final class IfFileName implements PathCondition { * @see FileSystem#getPathMatcher(String) */ @PluginFactory - public static IfFileName createNameCondition( // + public static IfFileName createNameCondition( // @formatter:off - @PluginAttribute("glob") final String glob, // - @PluginAttribute("regex") final String regex, // + @PluginAttribute("glob") final String glob, + @PluginAttribute("regex") final String regex, @PluginElement("PathConditions") final PathCondition... nestedConditions) { // @formatter:on return new IfFileName(glob, regex, nestedConditions); http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfLastModified.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfLastModified.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfLastModified.java index 4a3f7e7..4a4c717 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfLastModified.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfLastModified.java @@ -98,9 +98,9 @@ public final class IfLastModified implements PathCondition { * @return An IfLastModified condition. */ @PluginFactory - public static IfLastModified createAgeCondition( // + public static IfLastModified createAgeCondition( // @formatter:off - @PluginAttribute("age") final Duration age, // + @PluginAttribute("age") final Duration age, @PluginElement("PathConditions") final PathCondition... nestedConditions) { // @formatter:on return new IfLastModified(age, nestedConditions); http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfNot.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfNot.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfNot.java index 9f2246e..1baf187 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfNot.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/IfNot.java @@ -66,7 +66,7 @@ public final class IfNot implements PathCondition { * @return An IfNot PathCondition. */ @PluginFactory - public static IfNot createNotCondition( // + public static IfNot createNotCondition( @PluginElement("PathConditions") final PathCondition condition) { return new IfNot(condition); } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java index 8ac9b4b..50cdadf 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java @@ -29,7 +29,7 @@ import java.util.zip.ZipOutputStream; */ public final class ZipCompressAction extends AbstractAction { - private static final int BUF_SIZE = 8102; + private static final int BUF_SIZE = 8192; /** * Source file. http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a4e217c9/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 7675095..8735058 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -43,6 +43,9 @@ <action issue="LOG4J2-1982" dev="ggregory" type="fix" due-to="Christoph Lembeck"> Log4j-config.xsd only allows one AppenderRef element for each Logger element. </action> + <action issue="LOG4J2-1985" dev="ggregory" type="fix" due-to="Kenneth McFarland"> + Fix default buffer size to match documentation (from 8102 to 8192 a.k.a. 8KB.) + </action> <action issue="LOG4J2-1813" dev="rpopma" type="add"> Log4j2 will now print all internal logging to the console if system property `log4j2.debug` is defined with any value (or no value). </action>
