| Summary: | Setting log handler (java.util.logging.FileHandler.formatter) ignored | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | kcassell2001 | ||||||||||||
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> | ||||||||||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | curtis.windatt.public, darin.eclipse, Michael_Rennie, Olivier_Thomann | ||||||||||||
| Version: | 3.6 | ||||||||||||||
| Target Milestone: | --- | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows XP | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
kcassell2001
Created attachment 173965 [details]
Specifies the log properties
Created attachment 173966 [details]
A modified SampleAction for HelloWorld
Created attachment 173967 [details]
Log file when run as a Java app
If I run the SampleAction as a Java app, I get the desired log file output.
Created attachment 173968 [details]
Log file when run as a plug-in
If I run SampleAction from the spawned workspace, I get the undesirable XML log file.
Created attachment 173969 [details]
The custom log formatter
Moving to JDT/Debug. Adding Curtis for a comment from PDE. Is there anything special PDE does around logging or the like? PDE owns the log view, but it hooks into the Eclipe logging framework, not with java's logging utils. Since the file is getting pinged, it seems likely the java logger is having trouble parsing the properties file into a proper formatter. This does not look like an Eclipse bug. (In reply to comment #8) > PDE owns the log view, but it hooks into the Eclipe logging framework, not with > java's logging utils. Since the file is getting pinged, it seems likely the > java logger is having trouble parsing the properties file into a proper > formatter. This does not look like an Eclipse bug. I don't follow your analysis. First, if I run the SampleAction as a Java app, I get correct behavior as shown by the second attached log file. Second, when run as a plug-in, at least some of the properties file is being read correctly, because the log file is showing up in the correct location as specified in the properties file. So, what is it that makes you say it looks like a Java bug and not an Eclipse bug? As a wild guess on my part, is there some exotic class-loading that occurs when debugging plug-ins? (In reply to comment #9) > As a wild guess on my part, is there some exotic class-loading that occurs when > debugging plug-ins? Yes - an OSGi class loader is used when running/debugging plug-ins. When run as a plain java application, I assume the logger is found on the runtime classpath. When run as an OSGi app, there is no runtime classpath as such... OSGi instead knows which bundles are to be run, and each bundle gets a class loader. Perhaps this helps: http://dev.eclipse.org/newslists/news.eclipse.platform/msg68257.html Marking as won't fix. |