The Log Reference class, included in this package, is provided to isolate the bundle writers from the common and often used operations accompanying logging in the LogService. The Log class deals on behalf of the bundle, which instanciates it, while getting reference to and listening for events from the LogService.

A bundle, wishing to use the Log reference, must only pass its bundle context to the Log's constructor, from there on it can log INFO, ERROR, and DEBUG messages in the LogService, without caring for the availability even of the Log Bundle.

If there are changes in the state of the LogService (e.g. it is REGISTERED, or UNREGISTERING), the Log class cares to get or unget reference to it. While the LogService is unavailable, no matter what is the reason for this, the log information is printed on the server's console.

When the Log object should be released, (e.g. in case the bundle owner will be stopped) the resources, hold by the Log object should also be released: thus including ungetting LogService reference and removal of the ServiceListener from the framework. close() method does all the necessary clean up of ungetting LogService, removal of ServiceListener and internal variable clean up.

When multiple LogServices are available in the service registry, the Log class gets reference to only one of them. If a bundle wishes to publish the log information to all of the available LogServices, it can take advantage of the org.eclipse.equinox.util.tracker.ServiceTracker utility.

The Log Reference class implements the LogInterface class.