Bug 51025 - PropertyConfigurator does not properly set up ErrorHandler
Summary: PropertyConfigurator does not properly set up ErrorHandler
Status: NEW
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Configurator (show other bugs)
Version: 1.2
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 17:19 UTC by Gilad Raphaelli
Modified: 2011-04-05 17:20 UTC (History)
0 users



Attachments
Patch to ErrorHandlerTestCase to expose issue with 1.2.16 PropertyConfigurator (4.29 KB, application/octet-stream)
2011-04-05 17:19 UTC, Gilad Raphaelli
Details
Update PropertyConfigurator to process errorhandler directives (1.71 KB, patch)
2011-04-05 17:20 UTC, Gilad Raphaelli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gilad Raphaelli 2011-04-05 17:19:09 UTC
Created attachment 26858 [details]
Patch to ErrorHandlerTestCase to expose issue with 1.2.16 PropertyConfigurator

When configuring log4j using a properties-style file an appender's error handler is not set up properly.  Attached to this bug are two patches:

 - fix the ErrorHandlerTestCase to expose this bug - the current test is picking up the results from the first test run resulting in a false positive suceess.

 - update PropertyConfigurator to set the appender on the defined ErrorHandler, as xml.DOMConfigurator does, plus a set of fixes to parse the property file correctly.  fixing parsing without the appender fix results in a npe, as there is no primary appender.  fixing the the appender without the parser updates prevents a failback appender from ever being configured.
Comment 1 Gilad Raphaelli 2011-04-05 17:20:02 UTC
Created attachment 26859 [details]
Update PropertyConfigurator to process errorhandler directives