SweetWuXiaoMei commented on issue #3284: URL: https://github.com/apache/logging-log4j2/issues/3284#issuecomment-2553026313
``` // See if the logger is created by another thread in the meantime final Map<String, WeakReference<Logger>> loggerRefByName = loggerRefByNameByMessageFactory.computeIfAbsent(messageFactory, ignored -> new HashMap<>()); WeakReference<Logger> loggerRef = loggerRefByName.get(name); if (loggerRef != null && (logger = loggerRef.get()) != null) { return logger; } ``` This code snippet looks like a bug.If it is created for the first time, the loggerRefByName variable is null. Because loggerRefByNameByMessageFactory.computeIfAbsent will return null. I can fix this bug if needed. -- 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