Class Activator

java.lang.Object
org.apache.felix.log.Activator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

@Header(name="Bundle-Activator", value="${@class}") @Requirement(namespace="osgi.service", filter="(objectClass=org.osgi.service.cm.ConfigurationAdmin)", effective="active") public final class Activator extends Object implements org.osgi.framework.BundleActivator
The bundle activator for the OSGi log service (see section 101 of the service compendium).

The log service provides a general purpose message logger for the OSGi service platform. It consists of two services, one for logging information and another for retrieving current or previously recorded log information.

The service knows about the following properties which are read at bundle startup:

org.apache.felix.log.maxSize
Determines the maximum size of the log used to maintain historic log information. A value of -1 means the log has no maximum size; a value of 0 means that no historic log information will be maintained. The default value is 100.
org.apache.felix.log.storeDebug
Determines whether or not debug messages will be stored as part of the historic log information. The default value is false.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    start(org.osgi.framework.BundleContext context)
    Called by the OSGi framework when the bundle is started.
    void
    stop(org.osgi.framework.BundleContext context)
    Called by the OSGi framework when the bundle is stopped.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Activator

      public Activator()
  • Method Details

    • start

      public void start(org.osgi.framework.BundleContext context) throws Exception
      Called by the OSGi framework when the bundle is started. Used to register the service implementations with the framework.
      Specified by:
      start in interface org.osgi.framework.BundleActivator
      Parameters:
      context - the bundle context
      Throws:
      Exception - if an error occurs
    • stop

      public void stop(org.osgi.framework.BundleContext context) throws Exception
      Called by the OSGi framework when the bundle is stopped.
      Specified by:
      stop in interface org.osgi.framework.BundleActivator
      Parameters:
      context - the bundle context
      Throws:
      Exception - if an error occurs