Community
Participate
Working Groups
In preparation for bug292135 where we want to move the equinox log impl to the core framework we need to make the equinox log implementation substitutable. This involves the bundle exporting AND importing the org.eclipse.equinox.log package as well as doing a check to see if the system bundle has registered the ExtendedLogService before registering another copy.
Created attachment 183009 [details] patch This patch changes org.eclipse.equinox.log to allow a substitutable org.eclipse.equinox.log export. This allows for only one copy of the package to be available when the framework also exports the package. This patch also tightens up the import ranges of the other packages. This patch also modifies the activator to not register the log services if the ExtendedLogService is already registered by the system bundle. Finally I updated the log.tests to use Import-Package instead of requiring org.eclipse.equinox.log. I also removed the code that was using internals to set the error stream. Not sure why that was needed. As far as I can tell it was to avoid messages being written to standard error, but I don't think that is required.
Is this the same logger that's used when some EventHandler listening for stuff from EventAdmin throws an exception?
Yes, the eventAdmin implementation uses the LogService to log any errors. My thoughts are that we would encourage bundles to use the LogService to log all their errors so that we have a common logging API for all our clients. For our old logging APIs we will have to map them onto the (Extended)LogService.
Simon, can you review this patch also. If the patch in bug292135 is to be released I also want to release this patch.
+1 Looks fine.
Patch released.