Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319501 - [metatype] should use OSGi logging
Summary: [metatype] should use OSGi logging
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.7 M3   Edit
Assignee: John Ross CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 00:24 EDT by Bryan Hunt CLA
Modified: 2010-10-11 16:30 EDT (History)
1 user (show)

See Also:


Attachments
logging patch (29.05 KB, text/plain)
2010-07-12 00:24 EDT, Bryan Hunt CLA
tjwatson: iplog+
Details
logging patch 2 (43.45 KB, patch)
2010-10-07 02:38 EDT, John Ross CLA
no flags Details | Diff
logging patch 3 (43.68 KB, patch)
2010-10-07 21:22 EDT, John Ross CLA
tjwatson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!