Package org.apache.pekko.osgi
Class DefaultOSGiLogger
- java.lang.Object
-
- org.apache.pekko.event.Logging.DefaultLogger
-
- org.apache.pekko.osgi.DefaultOSGiLogger
-
- All Implemented Interfaces:
Actor
,RequiresMessageQueue<LoggerMessageQueueSemantics>
,Logging.StdOutLogger
public class DefaultOSGiLogger extends Logging.DefaultLogger
Logger for OSGi environment. Stands for an interface between Pekko and the OSGi LogService It uses the OSGi LogService to log the received LogEvents
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description DefaultOSGiLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
initialisedReceive(org.osgi.service.log.LogService logService)
Behavior of the Event handler that is setup (has received a LogService)void
logMessage(org.osgi.service.log.LogService logService, Logging.LogEvent event)
Logs a message in an OSGi LogServicejava.lang.String
messageFormat()
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receive()
Scala API: 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()
Behavior of the logger that waits for its LogService-
Methods inherited from class org.apache.pekko.event.Logging.DefaultLogger
context, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, self
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, postStop, preRestart, preStart, sender, supervisorStrategy, unhandled
-
-
-
-
Method Detail
-
initialisedReceive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> initialisedReceive(org.osgi.service.log.LogService logService)
Behavior of the Event handler that is setup (has received a LogService)- Parameters:
logService
- registered 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 logged using the LogService
-
messageFormat
public java.lang.String messageFormat()
-
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface:Actor
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.- Specified by:
receive
in interfaceActor
- Overrides:
receive
in classLogging.DefaultLogger
-
uninitialisedReceive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> uninitialisedReceive()
Behavior of the logger that waits for its LogService- Returns:
- Receive: Store LogEvent or become initialised
-
-