You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/08/30 01:43:00 UTC
[jira] [Commented] (LOG4J2-2808) LoggerContext should skip looking
up localhost when hostName is configured.
[ https://issues.apache.org/jira/browse/LOG4J2-2808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17406493#comment-17406493 ]
ASF subversion and git services commented on LOG4J2-2808:
---------------------------------------------------------
Commit f998bc6bb3bfbe8c5dbd3b58a7d7fb8f2522ac21 in logging-log4j2's branch refs/heads/master from Asapha
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=f998bc6 ]
LOG4J2-2808 Don't look up localhost if hostName is already configured
> LoggerContext should skip looking up localhost when hostName is configured.
> ---------------------------------------------------------------------------
>
> Key: LOG4J2-2808
> URL: https://issues.apache.org/jira/browse/LOG4J2-2808
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.8.2
> Reporter: Roy Zhou
> Assignee: Carter Kozak
> Priority: Major
> Fix For: 2.15.0
>
>
> [LoggerContext.java:608|[https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java#L608]][1]should use {{computeIfAbsent}} instead of {{putIfAbsent}}.
> When DNS is disabled on certain systems, NetUtils.getLocalHostname() will block and prevent LoggerContext from initializing correctly. When hostName is configured, NetUtils.getLocalHostname() should not be evaluated.
>
> [1] [https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java#L608]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)