akka.osgi
Class DefaultOSGiLogger
java.lang.Object
akka.event.Logging.DefaultLogger
akka.osgi.DefaultOSGiLogger
- All Implemented Interfaces:
- Actor, Logging.StdOutLogger
public class DefaultOSGiLogger
- extends Logging.DefaultLogger
Logger for OSGi environment.
Stands for an interface between akka and the OSGi LogService
It uses the OSGi LogService to log the received LogEvents
Method Summary |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
initialisedReceive(org.osgi.service.log.LogService logService)
Behaviour of the Eventhanlder that is setup (has received a LogService) |
void |
logMessage(org.osgi.service.log.LogService logService,
Logging.LogEvent event)
Logs a message in an OSGi LogService |
java.lang.String |
messageFormat()
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receive()
This defines the initial actor behavior, it must return a partial function
with the actor logic. |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
uninitialisedReceive()
Behaviour of the logger that waits for its LogService |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface akka.actor.Actor |
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, postStop, preRestart, preStart, self, sender, supervisorStrategy, unhandled |
Methods inherited from interface akka.event.Logging.StdOutLogger |
date, dateFormat, debug, debugFormat, error, errorFormat, errorFormatWithoutCause, info, infoFormat, print, timestamp, warning, warningFormat |
DefaultOSGiLogger
public DefaultOSGiLogger()
messageFormat
public java.lang.String messageFormat()
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
- Description copied from interface:
Actor
- This defines the initial actor behavior, it must return a partial function
with the actor logic.
- Specified by:
receive
in interface Actor
- Overrides:
receive
in class Logging.DefaultLogger
- Returns:
- (undocumented)
uninitialisedReceive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> uninitialisedReceive()
- Behaviour of the logger that waits for its LogService
- Returns:
- Receive: Store LogEvent or become initialised
initialisedReceive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> initialisedReceive(org.osgi.service.log.LogService logService)
- Behaviour of the Eventhanlder that is setup (has received a LogService)
- Parameters:
logService
- registrered OSGi LogService
- Returns:
- Receive : Logs LogEvent or go back to the uninitialised state
logMessage
public void logMessage(org.osgi.service.log.LogService logService,
Logging.LogEvent event)
- Logs a message in an OSGi LogService
- Parameters:
logService
- OSGi LogService registered and used for loggingevent
- akka LogEvent that is log unsing the LogService