You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2012/11/04 20:04:16 UTC
svn commit: r1405611 -
/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/BurstFilter.java
Author: ggregory
Date: Sun Nov 4 19:04:16 2012
New Revision: 1405611
URL: http://svn.apache.org/viewvc?rev=1405611&view=rev
Log:
Better param and lvar names.
Modified:
logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/BurstFilter.java
Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/BurstFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/BurstFilter.java?rev=1405611&r1=1405610&r2=1405611&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/BurstFilter.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/filter/BurstFilter.java Sun Nov 4 19:04:16 2012
@@ -210,7 +210,7 @@ public final class BurstFilter extends A
}
/**
- * @param level The logging level.
+ * @param levelName The logging level.
* @param rate The average number of events per second to allow.
* @param maxBurst The maximum number of events that can occur before events are filtered for exceeding the
* average rate. The default is 10 times the rate.
@@ -219,19 +219,19 @@ public final class BurstFilter extends A
* @return A BurstFilter.
*/
@PluginFactory
- public static BurstFilter createFilter(@PluginAttr("level") String level,
+ public static BurstFilter createFilter(@PluginAttr("level") String levelName,
@PluginAttr("rate") String rate,
@PluginAttr("maxBurst") String maxBurst,
@PluginAttr("onmatch") String match,
@PluginAttr("onmismatch") String mismatch) {
Result onMatch = Result.toResult(match, Result.NEUTRAL);
Result onMismatch = Result.toResult(mismatch, Result.DENY);
- Level lvl = Level.toLevel(level, Level.WARN);
+ Level level = Level.toLevel(levelName, Level.WARN);
float eventRate = rate == null ? DEFAULT_RATE : Float.parseFloat(rate);
if (eventRate <= 0) {
eventRate = DEFAULT_RATE;
}
long max = maxBurst == null ? (long) (eventRate * DEFAULT_RATE_MULTIPLE) : Long.parseLong(maxBurst);
- return new BurstFilter(lvl, eventRate, max, onMatch, onMismatch);
+ return new BurstFilter(level, eventRate, max, onMatch, onMismatch);
}
}