Repository: logging-log4j2 Updated Branches: refs/heads/master 76d78fe9a -> 62ddffd35
LOG4J2-1595 mark garbage-free Filters with the @PerformanceSensitive("allocation") annotation Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/62ddffd3 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/62ddffd3 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/62ddffd3 Branch: refs/heads/master Commit: 62ddffd35d828abd4d0b504b32aa9c96ee00a0ca Parents: 76d78fe Author: rpopma <rpo...@apache.org> Authored: Mon Nov 7 07:46:01 2016 +0900 Committer: rpopma <rpo...@apache.org> Committed: Mon Nov 7 07:46:01 2016 +0900 ---------------------------------------------------------------------- .../java/org/apache/logging/log4j/core/filter/CompositeFilter.java | 2 ++ .../apache/logging/log4j/core/filter/DynamicThresholdFilter.java | 2 ++ .../org/apache/logging/log4j/core/filter/LevelRangeFilter.java | 2 ++ .../java/org/apache/logging/log4j/core/filter/MarkerFilter.java | 2 ++ .../java/org/apache/logging/log4j/core/filter/ThresholdFilter.java | 2 ++ 5 files changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/62ddffd3/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java index 976e05d..c61bf57 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java @@ -35,11 +35,13 @@ import org.apache.logging.log4j.core.config.plugins.PluginElement; import org.apache.logging.log4j.core.config.plugins.PluginFactory; import org.apache.logging.log4j.core.util.ObjectArrayIterator; import org.apache.logging.log4j.message.Message; +import org.apache.logging.log4j.util.PerformanceSensitive; /** * Composes and invokes one or more filters. */ @Plugin(name = "filters", category = Node.CATEGORY, printObject = true) +@PerformanceSensitive("allocation") public final class CompositeFilter extends AbstractLifeCycle implements Iterable<Filter>, Filter { private static final Filter[] EMPTY_FILTERS = new Filter[0]; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/62ddffd3/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java index 86373a5..92a8433 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java @@ -35,6 +35,7 @@ import org.apache.logging.log4j.core.ContextDataInjector; import org.apache.logging.log4j.core.impl.ContextDataInjectorFactory; import org.apache.logging.log4j.core.util.KeyValuePair; import org.apache.logging.log4j.message.Message; +import org.apache.logging.log4j.util.PerformanceSensitive; import org.apache.logging.log4j.util.ReadOnlyStringMap; /** @@ -43,6 +44,7 @@ import org.apache.logging.log4j.util.ReadOnlyStringMap; * {@link ContextDataInjector} which obtains context data from some other source. */ @Plugin(name = "DynamicThresholdFilter", category = Node.CATEGORY, elementType = Filter.ELEMENT_TYPE, printObject = true) +@PerformanceSensitive("allocation") public final class DynamicThresholdFilter extends AbstractFilter { /** http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/62ddffd3/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/LevelRangeFilter.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/LevelRangeFilter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/LevelRangeFilter.java index 627b438..8f4769c 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/LevelRangeFilter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/LevelRangeFilter.java @@ -26,6 +26,7 @@ import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginFactory; import org.apache.logging.log4j.message.Message; +import org.apache.logging.log4j.util.PerformanceSensitive; /** * This filter returns the {@code onMatch} result if the level in the {@code LogEvent} is in the range of the configured @@ -38,6 +39,7 @@ import org.apache.logging.log4j.message.Message; * </p> */ @Plugin(name = "LevelRangeFilter", category = Node.CATEGORY, elementType = Filter.ELEMENT_TYPE, printObject = true) +@PerformanceSensitive("allocation") public final class LevelRangeFilter extends AbstractFilter { /** http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/62ddffd3/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java index c61c612..d56b603 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/MarkerFilter.java @@ -26,12 +26,14 @@ import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginFactory; import org.apache.logging.log4j.message.Message; +import org.apache.logging.log4j.util.PerformanceSensitive; /** * This filter returns the onMatch result if the marker in the LogEvent is the same as or has the * configured marker as a parent. */ @Plugin(name = "MarkerFilter", category = Node.CATEGORY, elementType = Filter.ELEMENT_TYPE, printObject = true) +@PerformanceSensitive("allocation") public final class MarkerFilter extends AbstractFilter { private final String name; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/62ddffd3/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java index e860c72..641cb66 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java @@ -26,6 +26,7 @@ import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginFactory; import org.apache.logging.log4j.message.Message; +import org.apache.logging.log4j.util.PerformanceSensitive; /** * This filter returns the onMatch result if the level in the LogEvent is the same or more specific @@ -36,6 +37,7 @@ import org.apache.logging.log4j.message.Message; * The default Level is ERROR. */ @Plugin(name = "ThresholdFilter", category = Node.CATEGORY, elementType = Filter.ELEMENT_TYPE, printObject = true) +@PerformanceSensitive("allocation") public final class ThresholdFilter extends AbstractFilter { private final Level level;