Bug 971190

Summary: log4j appenders force initialization of the appender/handler on reboot
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: James Perkins <jperkins>
Component: LoggingAssignee: James Perkins <jperkins>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: cdewolf, jperkins, klape, lcosti, pkremens, rdickens
Target Milestone: ER4   
Target Release: EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of:
: 971618 (view as bug list) Environment:
Last Closed: 2013-09-16 20:26:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 971618    

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