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


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java:
##########
@@ -774,8 +774,11 @@ public static Level getDefaultLevel() {
     }
 
     protected void setToDefault() {
-        // LOG4J2-1176 facilitate memory leak investigation
-        setName(DefaultConfiguration.DEFAULT_NAME + "@" + 
Integer.toHexString(hashCode()));
+        // LOG4J2-3431 don't set a default name if one has already been set
+        if (this.getName() == null || this.getName().trim().isEmpty()) {

Review Comment:
   We have a `Strings.isEmpty` utility method for this.



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