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
  • 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

      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 logging
      event - akka LogEvent that is logged using the LogService
    • messageFormat

      public String messageFormat()
    • receive

      public scala.PartialFunction<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 interface Actor
      Overrides:
      receive in class Logging.DefaultLogger
    • uninitialisedReceive

      public scala.PartialFunction<Object,scala.runtime.BoxedUnit> uninitialisedReceive()
      Behavior of the logger that waits for its LogService
      Returns:
      Receive: Store LogEvent or become initialised