public class LogActivator extends Object implements org.osgi.service.log.LogListener, org.osgi.framework.BundleActivator, org.osgi.framework.ServiceListener
Constructor and Description |
---|
LogActivator(org.slf4j.Logger logger)
Creates a log activator.
|
Modifier and Type | Method and Description |
---|---|
void |
logged(org.osgi.service.log.LogEntry le)
A message were logged in the log service.
|
void |
serviceChanged(org.osgi.framework.ServiceEvent ev)
The Service Listener method.
|
void |
setLogServiceReference(org.osgi.framework.ServiceReference ref)
Sets the log service reference.
|
void |
start(org.osgi.framework.BundleContext bc)
Initializes LogReaderService tracking.
|
void |
stop(org.osgi.framework.BundleContext bc)
Stops Log tracking.
|
public LogActivator(org.slf4j.Logger logger)
logger
- the chameleon loggerpublic void setLogServiceReference(org.osgi.framework.ServiceReference ref)
ref
- the service referencepublic void logged(org.osgi.service.log.LogEntry le)
logged
in interface org.osgi.service.log.LogListener
le
- the log entrylogged(org.osgi.service.log.LogEntry)
public void start(org.osgi.framework.BundleContext bc) throws Exception
start
in interface org.osgi.framework.BundleActivator
bc
- the bundle contextException
- if the log activator cannot be started correctly.start(org.osgi.framework.BundleContext)
public void stop(org.osgi.framework.BundleContext bc) throws Exception
stop
in interface org.osgi.framework.BundleActivator
bc
- the bundle contextException
- if the log activator cannot be started correctly.stop(org.osgi.framework.BundleContext)
public void serviceChanged(org.osgi.framework.ServiceEvent ev)
serviceChanged
in interface org.osgi.framework.ServiceListener
ev
- the Service EventserviceChanged(org.osgi.framework.ServiceEvent)
Copyright © 2009–2013 OW2 Chameleon. All rights reserved.