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
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 -
Method Summary
Modifier and TypeMethodDescriptionscala.PartialFunction<Object,scala.runtime.BoxedUnit> initialisedReceive(org.osgi.service.log.LogService logService) Behavior of the Event handler that is setup (has received a LogService)voidlogMessage(org.osgi.service.log.LogService logService, Logging.LogEvent event) Logs a message in an OSGi LogServicescala.PartialFunction<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<Object,scala.runtime.BoxedUnit> Behavior of the logger that waits for its LogServiceMethods 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, selfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, postStop, preRestart, preStart, sender, supervisorStrategy, unhandled
-
Constructor Details
-
DefaultOSGiLogger
public DefaultOSGiLogger()
-
-
Method Details
-
initialisedReceive
public scala.PartialFunction<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
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
-
receive
Description copied from interface:ActorScala API: This defines the initial actor behavior, it must return a partial function with the actor logic.- Specified by:
receivein interfaceActor- Overrides:
receivein classLogging.DefaultLogger
-
uninitialisedReceive
Behavior of the logger that waits for its LogService- Returns:
- Receive: Store LogEvent or become initialised
-