org.apache.sling.commons.log.internal
Class LogSupport

java.lang.Object
  extended by org.apache.sling.commons.log.internal.LogSupport
All Implemented Interfaces:
EventListener, org.osgi.framework.BundleListener, org.osgi.framework.FrameworkListener, org.osgi.framework.ServiceListener

public class LogSupport
extends Object
implements org.osgi.framework.BundleListener, org.osgi.framework.ServiceListener, org.osgi.framework.FrameworkListener

The LogReaderServiceFactory TODO


Method Summary
 void bundleChanged(org.osgi.framework.BundleEvent event)
          Listens for Bundle events and logs the respective events according to the Log Service specification.
 void frameworkEvent(org.osgi.framework.FrameworkEvent event)
          Listens for Framework events and logs the respective events according to the Log Service specification.
 void serviceChanged(org.osgi.framework.ServiceEvent event)
          Listens for Service events and logs the respective events according to the Log Service specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

bundleChanged

public void bundleChanged(org.osgi.framework.BundleEvent event)
Listens for Bundle events and logs the respective events according to the Log Service specification. In addition, all LogListener instances registered for stopped bundles are removed by this method.

Specified by:
bundleChanged in interface org.osgi.framework.BundleListener

serviceChanged

public void serviceChanged(org.osgi.framework.ServiceEvent event)
Listens for Service events and logs the respective events according to the Log Service specification.

Specified by:
serviceChanged in interface org.osgi.framework.ServiceListener

frameworkEvent

public void frameworkEvent(org.osgi.framework.FrameworkEvent event)
Listens for Framework events and logs the respective events according to the Log Service specification.

In the case of a Framework ERROR which is a ClassNotFoundException for an unresolved bundle, the message is logged at INFO level instead of ERROR level as prescribed by the spec. This is because such a situation should not really result in a Framework ERROR but the Apache Felix framework has no means of controlling this at the moment (framework 1.0.4 release).

Specified by:
frameworkEvent in interface org.osgi.framework.FrameworkListener


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.