|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.junit4osgi.plugin.log.LogServiceImpl
public class LogServiceImpl
An implementation of the log service to collect logged messages.
This service implementation is also BundleActivator
and is
activated when the embedded OSGi platform starts.
Field Summary |
---|
Fields inherited from interface org.osgi.service.log.LogService |
---|
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING |
Constructor Summary | |
---|---|
LogServiceImpl()
Creates the log service object. |
Method Summary | |
---|---|
void |
enableOutputStream()
Enables the log messages collection. |
String |
getLoggedMessages()
Get collected log messages. |
void |
log(int arg0,
String arg1)
Logs a message. |
void |
log(int arg0,
String arg1,
Throwable arg2)
Logs a message with an attached exception. |
void |
log(ServiceReference arg0,
int arg1,
String arg2)
Logs a message raised by the given service reference. |
void |
log(ServiceReference arg0,
int arg1,
String arg2,
Throwable arg3)
Logs a message raised by the given service reference associated with an exception. |
void |
reset()
Re-initializes the collected message list. |
void |
start(BundleContext bc)
Stars the log service implementation: Registers the service. |
void |
stop(BundleContext arg0)
Stops the log service implementation. |
void |
write(String log)
Writes the given message in the adequate output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogServiceImpl()
Method Detail |
---|
public void enableOutputStream()
public String getLoggedMessages()
public void reset()
public void log(int arg0, String arg1)
log
in interface LogService
arg0
- the log levelarg1
- the messageLogService.log(int, java.lang.String)
public void log(int arg0, String arg1, Throwable arg2)
log
in interface LogService
arg0
- the log levelarg1
- the messagearg2
- the associated exceptionLogService.log(int, java.lang.String, java.lang.Throwable)
public void log(ServiceReference arg0, int arg1, String arg2)
log
in interface LogService
arg0
- the service referencearg1
- the log levelarg2
- the messageLogService.log(org.osgi.framework.ServiceReference, int, java.lang.String)
public void log(ServiceReference arg0, int arg1, String arg2, Throwable arg3)
log
in interface LogService
arg0
- the service referencearg1
- the log levelarg2
- the messagearg3
- the exceptionLogService.log(org.osgi.framework.ServiceReference, int, java.lang.String)
public void write(String log)
log
- the messagepublic void start(BundleContext bc) throws Exception
start
in interface BundleActivator
bc
- the bundle context.
Exception
- should not happen.BundleActivator.start(org.osgi.framework.BundleContext)
public void stop(BundleContext arg0) throws Exception
stop
in interface BundleActivator
arg0
- the bundle context
Exception
- should not happen.BundleActivator.stop(org.osgi.framework.BundleContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |