Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319501

Summary: [metatype] should use OSGi logging
Product: [Eclipse Project] Equinox Reporter: Bryan Hunt <bhunt>
Component: CompendiumAssignee: John Ross <jwross>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: tjwatson
Version: unspecified   
Target Milestone: 3.7 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
logging patch
tjwatson: iplog+
logging patch 2
none
logging patch 3 tjwatson: iplog+

Description Bryan Hunt CLA 2010-07-12 00:24:51 EDT
Created attachment 173989 [details]
logging patch

The metatype service currently uses a home-grown logging service.  It should use the OSGi logging service.
Comment 1 Bryan Hunt CLA 2010-09-27 11:20:02 EDT
Tom, can we get this into 3.7?
Comment 2 Thomas Watson CLA 2010-09-27 13:01:01 EDT
John, could you take a look at this?
Comment 3 John Ross CLA 2010-10-07 02:38:46 EDT
Created attachment 180393 [details]
logging patch 2

I made some updates to the original patch. For the sake of consistency, I reused the LogTracker class as in several other implementations such as ConfigAdmin, Device, EventAdmin, HTTP, and UserAdmin. This class will log to all registered LogService instances or, if none, to System.out/System.err. Also, I passed the LogTracker as a constructor arg to the various objects instead of turning the Activator into a virtual LogService retrieved from a getInstance() method.

Bryan, thanks for the report and patch. Please let me know if the updated patch does not suit your needs.

Tom, BJ, there appear to be some other issues with the code that I did not attempt to address here. The updated patch focuses exclusively on the original intent of this bug.
Comment 4 John Ross CLA 2010-10-07 21:22:08 EDT
Created attachment 180465 [details]
logging patch 3

Minor change to pass the more generic LogService type instead of LogTracker to other objects. LogTracker is essentially a composite LogService.
Comment 5 Bryan Hunt CLA 2010-10-08 20:41:45 EDT
Updated patch looks good.
Comment 6 Thomas Watson CLA 2010-10-11 16:30:51 EDT
I updated the copyright dates and released the patch.  Thanks Bryan and John for the contributions!