| Summary: | WebUtil.initCommonsLoggingSettings sets a system property that mutes other plugins using JCL | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Shaw Terwilliger <sterwill> |
| Component: | Mylyn | Assignee: | Project Inbox <mylyn-triaged> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | critical | ||
| Priority: | P2 | CC: | steffen.pingel |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Bug Depends on: | 358968 | ||
| Bug Blocks: | |||
The reason for configuring the logging system is that otherwise warning messages from HttpClient and possibly other libraries ends up on the console by default which can be confusing. It's a work-around since to my knowledge there is no support in the platform to configure commons logging. Users can easily enable logging by specifying the org.apache.commons.logging.Log system property but I see your point that a generic mechanism or relying on the default discovery mechanism would be preferable. I have raised bug 358968 to discuss this on a cross projects level. Depending on the outcome we may end up removing the explicit configuration of commons logging in Mylyn to avoid conflicts with other consumers of commons logging. Since there has been no activity on this bug in a very long time, I am marking it WORKSFORME. Please feel free to reopen the bug if it is still an issue. |
Build Identifier: 20110615-0604 When TasksUiPlugin starts it loads the WebUtil class, which sets the JCL system property "org.apache.commons.logging.Log" to use NoOpLog if the user didn't set the property explicitly (few will). Other plug-ins that start after TasksUiPlugin, and desire JCL's default log implementation discovery (which tries to load a _working_ implementation like log4j) are now stuck with NoOpLog. It would be nice if WebUtil didn't do any JCL configuration and just let the normal discovery mechanism work. I don't know of any other Eclipse plug-ins that configure JCL without explicit user input, and NoOpLog is an especially cruel default. Reproducible: Always Steps to Reproduce: 1. Develop a new "logger" bundle that includes log4j and starts later than Mylyn TasksUiPlugin and logs something via JCL at startup like: LogFactory.getLog(LoggerPlugin.class).error("my critical error"); 2. Run Eclipse with "logger" and Mylyn installed 3. See no log output via log4j for "logger" when it starts/runs 4. Confirm NoOpLog was used instead of log4j by stepping into LogFactory.getLog() in the debugger