Skip to content

Commit 2cde19b

Browse files
committed
Apply review suggestions (2)
1 parent c934a48 commit 2cde19b

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ package "Configuration" as c {
4242
4343
class Configuration {
4444
Appender[] appenders
45-
Filter[] filters
45+
Filter filter
4646
LoggerConfig[] loggerConfigs
4747
LoggerConfig getLoggerConfig(String name)
4848
StrSubstitutor substitutor
@@ -198,7 +198,7 @@ LoggerContext --> "0..*" Logger
198198
199199
class Configuration {
200200
Appender[] appenders
201-
Filter[] filters
201+
Filter filter
202202
LoggerConfig[] loggerConfigs
203203
LoggerConfig getLoggerConfig(String name)
204204
StrSubstitutor substitutor
@@ -237,7 +237,7 @@ LoggerContext --> Configuration
237237
238238
class Configuration #line.bold {
239239
Appender[] appenders
240-
Filter[] filters
240+
Filter filter
241241
LoggerConfig[] loggerConfigs
242242
LoggerConfig getLoggerConfig(String name)
243243
StrSubstitutor substitutor
@@ -397,7 +397,7 @@ A `LoggerConfig` essentially contains
397397
398398
class Configuration {
399399
Appender[] appenders
400-
Filter[] filters
400+
Filter filter
401401
LoggerConfig[] loggerConfigs
402402
LoggerConfig getLoggerConfig(String name)
403403
StrSubstitutor substitutor
@@ -541,13 +541,13 @@ In addition to <<LoggerConfig,the level-based filtering facilitated by `LoggerCo
541541
542542
class Configuration {
543543
Appender[] appenders
544-
Filter[] filters
544+
Filter filter
545545
LoggerConfig[] loggerConfigs
546546
LoggerConfig getLoggerConfig(String name)
547547
StrSubstitutor substitutor
548548
}
549549
550-
Configuration --> "0..*" Filter
550+
Configuration --> Filter
551551
552552
Configuration --> "0..*" LoggerConfig
553553
@@ -575,6 +575,10 @@ class AppenderRef {
575575
Filter filter
576576
}
577577
578+
class AppenderControl {
579+
Filter filter
580+
}
581+
578582
AppenderRef --> Filter
579583
580584
AppenderControl --> Filter
@@ -599,7 +603,7 @@ See xref:manual/appenders.adoc[] for the complete guide.
599603
600604
class Configuration {
601605
Appender[] appenders
602-
Filter[] filters
606+
Filter filter
603607
LoggerConfig[] loggerConfigs
604608
LoggerConfig getLoggerConfig(String name)
605609
StrSubstitutor substitutor

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121
2222
Filters are Log4j plugins that evaluate the parameters of a logging call or a log event and return one of three results:
2323
24-
ACCEPT:: The log event is accepted by the filter and goes to the next stage of the logging pipeline.
24+
ACCEPT:: The filter accepts the log event.
25+
Other filters in the same filtering stage are not evaluated.
2526
26-
DENY:: The log event is unconditionally dropped.
27+
DENY:: The filter drops the log event.
2728
2829
NEUTRAL:: Log4j behaves as if the filter was not present.
30+
It is evaluated by the next filter in the filter chain.
2931
3032
Filters can be used at each level of the
3133
xref:manual/architecture.adoc#architecture-diagram[logging pipeline]:
@@ -118,6 +120,8 @@ xref:manual/appenders.adoc#AsyncAppender[asynchronous appenders].
118120
....
119121
@startuml
120122
start
123+
:LogEvent;
124+
121125
group LoggerConfig
122126
repeat
123127
@@ -151,8 +155,9 @@ until it reaches the logger that references the chosen appender.
151155
[plantuml]
152156
....
153157
@startuml
154-
!pragma useVerticalIf on
155158
start
159+
:LogEvent;
160+
156161
group AppenderControl
157162
158163
:AppenderControl#callAppender();
@@ -190,9 +195,9 @@ of the appender reference.
190195
....
191196
@startuml
192197
start
193-
group Appender
198+
:LogEvent;
194199
195-
:Appender#append();
200+
group Appender
196201
197202
if (Apply appender filter) then (DENY)
198203
#pink:Discard;
@@ -202,7 +207,7 @@ else (not DENY)
202207
label a1
203208
endif
204209
end group
205-
#palegreen:Log message;
210+
#palegreen:Appender#append();
206211
@enduml
207212
....
208213
@@ -323,7 +328,7 @@ The `Filters` plugin sequentially evaluates each sub-filter and:
323328
* if the sub-filter return `NEUTRAL`, the `Filters` plugin evaluates the next sub-filter in the chain.
324329
* if the last sub-filter returns `NEUTRAL`, the `Filters` plugin returns `NEUTRAL`.
325330
326-
The `Filters` plugin together with the ternary logic of filters, can be used to express all the boolean operators.
331+
The `Filters` plugin together with the ternary logic of filters, can be used to express most boolean operators.
327332
In the following examples `A` and `B` are two filters.
328333
329334
`NOT A`::

0 commit comments

Comments
 (0)