ppkarwasz commented on code in PR #2242:
URL: https://github.com/apache/logging-log4j2/pull/2242#discussion_r1466575669


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java:
##########
@@ -614,15 +611,18 @@ public ReliabilityStrategy getReliabilityStrategy() {
      * Logs an event, bypassing filters.
      *
      * @param event     The log event.
-     * @param predicate predicate for which LoggerConfig instances to append 
to. A
-     *                  {@literal null} value is equivalent to a true 
predicate.
+     * @param dispatchType decides which logger configs should be used.
      */
-    protected void processLogEvent(final LogEvent event, final 
LoggerConfigPredicate predicate) {
+    protected void processLogEvent(final LogEvent event, final DispatchType 
dispatchType) {
         event.setIncludeLocation(isIncludeLocation());
-        if (predicate == null || predicate.allow(this)) {
+        if (hasDispatchType(dispatchType)) {
             callAppenders(event);
         }
-        logParent(event, predicate);
+        logParent(event, dispatchType);
+    }
+
+    protected boolean hasDispatchType(final DispatchType dispatchType) {
+        return dispatchType != DispatchType.ASYNCHRONOUS;

Review Comment:
   I replaced `LoggerConfigPredicate` with `Predicate<LoggerConfig>`.
   All references to async in `log4j-core` should be gone.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to