[jboss-jira] [JBoss JIRA] (JBLOGGING-101) Each custom log handler defined in standalone adds a root log4j console appender
James Perkins (JIRA)
issues at jboss.org
Tue Mar 25 20:17:13 EDT 2014
[ https://issues.jboss.org/browse/JBLOGGING-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12956333#comment-12956333 ]
James Perkins commented on JBLOGGING-101:
-----------------------------------------
It's somewhat fixed in 7.2.0.Final and would be better if you override the {{log4j-jboss-logmanager}} dependency. While the 1.0.x version works for the most part, there is some weirdness around using a {{ConsoleAppender}} sometimes. That should be fixed in 1.1.0.Final. Just to note though there is one bug to look out for LOGMGR-95. Not a huge deal, but it's there.
You can build 7.2.0.Final and override the dependency by passing {{-Dversion.org.jboss.logmanager.log4j-jboss-logmanager=1.1.0.Final}} as a build parameter.
> Each custom log handler defined in standalone adds a root log4j console appender
> --------------------------------------------------------------------------------
>
> Key: JBLOGGING-101
> URL: https://issues.jboss.org/browse/JBLOGGING-101
> Project: JBoss Logging
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jboss-logging-log4j
> Reporter: John L
> Assignee: James Perkins
>
> JBoss 7.1.3 Logging custom handlers which are used to wrap existing log4j handlers
> into jboss logging handlers calls
> org.jboss.as.logging.handlers.custom.PropertiesConfigurator
> which calls org.apache.log4j.BasicConfigurator.configure()
> which by default adds a ConsoleAppender. Maybe should be calling
> org.apache.log4j.BasicConfigurator.configure(new NullAppender()); to initialize log4j.
> Net result is all log4j messages get forwarded to jboss logging add also get sent to the default ConsoleAppender which then writes it out stdout which then jboss catches
> as stdout. So we have 3 custom handlers in our jboss configuration so we get 4 messages
> to the screen. (1 for real category and 3 for each console appender added).
> Not sure if this is reported in correct project.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list