Bug 971190 - log4j appenders force initialization of the appender/handler on reboot
Summary: log4j appenders force initialization of the appender/handler on reboot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Logging
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER4
: EAP 6.1.1
Assignee: James Perkins
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 971618
TreeView+ depends on / blocked
 
Reported: 2013-06-06 00:31 UTC by James Perkins
Modified: 2013-09-16 20:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6 , when a custom Apache log4j appender was added, the manually configured appender's class name was incorrectly compared to the included class name during bootstrapping. This issue resulted in the custom handler being reconfigured during every reboot of the JBoss EAP 6 instance. This issue may have affected configurations which used a `FileAppender` that was not set to append, resulting in overwritten log files. This issue was fixed by wrapping the log4j appender in a `java.util.logging.Handler` named `org.jboss.as.logging.logmanager.Log4jAppenderHandler`, and properly checking the class name with the appender's class name from the handler. As a result, if the checks match, a custom log4j appender handler is not reconfigured during every reboot of the JBoss EAP 6 instance.
Clone Of:
: 971618 (view as bug list)
Environment:
Last Closed: 2013-09-16 20:26:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-1379 0 Major Resolved log4j appenders force initialization of the appender/handler on reboot 2015-11-18 07:31:10 UTC

Description James Perkins 2013-06-06 00:31:37 UTC
Description of problem:
Adding a log4j appender works until the server is rebooted. The difference in the class names, org.apache.log4j.SomeAppender and manually added org.jboss.as.logging.logmanager.Log4jAppenderHandler, results in the handler being reconfigured.
This also hits a bug (LOGMGR-58) in the logmanager where null references are can be retrieved before a full commit is invoked.

Steps to Reproduce:
Add a custom handler that is a log4j appender and define at least one property.

Comment 2 JBoss JIRA Server 2013-06-11 23:49:32 UTC
James Perkins <jperkins> made a comment on jira WFLY-1379

Pull request merged

Comment 3 Carlo de Wolf 2013-06-12 07:47:10 UTC
Pending resolution of https://issues.jboss.org/browse/WFLY-1503

Comment 5 Petr Kremensky 2013-07-31 06:48:12 UTC
Verified on EAP 6.1.1 ER4


Note You need to log in before you can comment on or make changes to this bug.