Summary: | PropertyConfigurator.configureAndWatch() don't reset the configuration | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | Eric Chastan <eric.chastan> |
Component: | Configurator | Assignee: | log4j-dev <log4j-dev> |
Status: | RESOLVED FIXED | ||
Severity: | minor | ||
Priority: | P3 | ||
Version: | 1.2 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | other |
Description
Eric Chastan
2003-02-28 16:08:54 UTC
Thanx! Was just about to submit the exact same change. Altough there is an abbreviation availabel: public void doOnChange() { LogManager.resetConfiguration(); new PropertyConfigurator().doConfigure(filename, LogManager.getLoggerRepository()); } The same improvement also applies to the DOMConfigurator. The "additive" nature of configuration application, as you describe it, is actually considered a feature. For 1.3 we are looking to add a "reset" option in the configuration file. Leaving this open until this feature is added to v1.3 code. Fix added to 1.3, SVN trunk. DTD modified to include attribute "reset" for <configuration>, default value is "false"; "true" resets the repository. For properties files, use the analogous "log4j.reset", default is false. Changes committed by Elias Ross in rev 500169 and rev 500384 Committed against log4j 1.2 branch in rev 568750 and against extras companion in 568753. |