[jboss-jira] [JBoss JIRA] (LOGMGR-95) Log4j Logger.getParent() inconsistent
RH Bugzilla Integration (JIRA)
issues at jboss.org
Tue Oct 7 20:40:39 EDT 2014
[ https://issues.jboss.org/browse/LOGMGR-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009592#comment-13009592 ]
RH Bugzilla Integration commented on LOGMGR-95:
-----------------------------------------------
Paul Gier <pgier at redhat.com> changed the Status of [bug 1079106|https://bugzilla.redhat.com/show_bug.cgi?id=1079106] from MODIFIED to ON_QA
> Log4j Logger.getParent() inconsistent
> -------------------------------------
>
> Key: LOGMGR-95
> URL: https://issues.jboss.org/browse/LOGMGR-95
> Project: JBoss Log Manager
> Issue Type: Bug
> Reporter: James Livingston
> Assignee: James Perkins
>
> Log4j Loggers have a getParent() method, whose return value is set up by JBossLogManagerFacade.updateParents(). The method locates the closest parent node which has an existing Log4J logger created *at the time*. This results in the parent being different depending on the order Log4j loggers are used in.
> Consider:
> Logger.getLogger("a");
> Logger.getLogger("a.b.c");
> Logger.getLogger("a.b");
> When the second line causes updateParents() to be called, LoggerNode.getOrCreate() has already created the intermediate "a.b" node. That does not yet have a Log4j Logger created, so the Logger for "a" is returned. Original log4j would have returned "a.b" due to it using the parent structure in the implementation.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the jboss-jira
mailing list