vy commented on code in PR #3209:
URL: https://github.com/apache/logging-log4j2/pull/3209#discussion_r1846189732


##########
log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerRegistry.java:
##########
@@ -243,32 +232,30 @@ public boolean hasLogger(final String name, final Class<? 
extends MessageFactory
      * Registers the provided logger.
      * <b>Logger name and message factory parameters are ignored</b>, those 
will be obtained from the logger instead.
      *
-     * @param name ignored – kept for backward compatibility
-     * @param messageFactory ignored – kept for backward compatibility
+     * @param name a logger name

Review Comment:
   > We want to make sure that `getLogger(name, mf)` returns the object that 
was inserted using `putIfAbsent(name, mf, logger)`. This way `getLogger` will 
not return `null` even if `(name, mf)` is different from `(logger.getName(), 
logger.getMessageFactory())`.
   
   Can't we solve this problem by extracting `name` and `MF` from the `Logger` 
in `putIfAbsent()` too?
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to