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


##########
log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerRegistry.java:
##########
@@ -43,7 +41,7 @@
 @NullMarked
 public class LoggerRegistry<T extends ExtendedLogger> {
 
-    private final Map<String, Map<MessageFactory, WeakReference<T>>> 
loggerRefByMessageFactoryByName = new HashMap<>();
+    private final Map<MessageFactory, Map<String, T>> 
loggerByNameByMessageFactory = new WeakHashMap<>();

Review Comment:
   The current code is fixed:
   
   
https://github.com/apache/logging-log4j2/blob/89c9b9f81cb12a6a217788a71832bfbd3b6d07b2/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java#L527-L531
   
   The changes in this PR are mainly there to allow `log4j-api` version 
`2.24.2/2.25.0` to work with any `log4j-core` version `2.24.x`.



-- 
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