Skip to content

Commit 6448bdb

Browse files
committed
Fix BurstFilter description
1 parent 2cde19b commit 6448bdb

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/site/antora/modules/ROOT/pages/manual/filters.adoc

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
1818
[id=filters]
1919
= Filters
20-
:stem:
2120
2221
Filters are Log4j plugins that evaluate the parameters of a logging call or a log event and return one of three results:
2322
@@ -376,7 +375,7 @@ Timestamp filters use the timestamp of log events to decide whether to accept th
376375
[#BurstFilter]
377376
==== `BurstFilter`
378377
379-
The `BurstFilter` uses the _sliding window log_ algorithm to limit the rate of log events.
378+
The `BurstFilter` limits the rate of log events.
380379
The rate limit is only applied to log events less severe than a configured log level.
381380
382381
Besides the common configuration attributes,
@@ -401,18 +400,23 @@ Events at least as severe as this level will always match.
401400
| maxBurst
402401
| `long`
403402
| `10 × rate`
404-
| The maximum number of events in a sliding window.
403+
| The maximum number of events that can be logged at once, without incurring in rate limiting.
405404
406405
|===
407406
408-
The sliding window can be easily computed as:
407+
[NOTE]
408+
====
409+
The `BurstFilter` uses the _sliding window log_ algorithm with a window `window` of `maxBurst / rate` seconds.
409410
410-
[stem]
411-
++++
412-
wi\ndow = (m\axBurst) / (rate),
413-
++++
411+
The filter maintains a list of recently logged events.
412+
If in the interval of time of duration `window` preceding the current log event,
413+
more than `maxBurst` events have already been logged, rate limiting is applied.
414414
415-
where `window` is the duration of the sliding window in seconds.
415+
To control the size of the log files only the `rate` attribute needs to be taken into account.
416+
The `maxBurst` attribute controls the temporal spacing between log events:
417+
lower values of `maxBurst` will give more evenly spaced log events,
418+
while higher values will allow for peaks of activity followed by an absence of log events.
419+
====
416420
417421
xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-filter-BurstFilter[📖 Plugin reference for `BurstFilter`]
418422

0 commit comments

Comments
 (0)