Class LoggingReceive$

java.lang.Object
org.apache.pekko.event.LoggingReceive$

public class LoggingReceive$ extends Object
  • Field Details

    • MODULE$

      public static final LoggingReceive$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • LoggingReceive$

      public LoggingReceive$()
  • Method Details

    • apply

      public scala.PartialFunction<Object,scala.runtime.BoxedUnit> apply(scala.PartialFunction<Object,scala.runtime.BoxedUnit> r, ActorContext context)
      Wrap a Receive partial function in a logging enclosure, which sends a debug message to the event bus each time before a message is matched. This includes messages which are not handled.

      
       def receive = LoggingReceive {
         case x => ...
       }
       

      This method does NOT modify the given Receive unless pekko.actor.debug.receive is set in configuration.

    • apply

      public scala.PartialFunction<Object,scala.runtime.BoxedUnit> apply(Logging.LogLevel logLevel, scala.PartialFunction<Object,scala.runtime.BoxedUnit> r, ActorContext context)
      Wrap a Receive partial function in a logging enclosure, which sends a message with given log level to the event bus each time before a message is matched. This includes messages which are not handled.
    • create

      Java API: compatible with lambda expressions
    • withLabel

      public scala.PartialFunction<Object,scala.runtime.BoxedUnit> withLabel(String label, Logging.LogLevel logLevel, scala.PartialFunction<Object,scala.runtime.BoxedUnit> r, ActorContext context)
      Create a decorated logger which will append " in state " + label to each message it logs.
    • withLabel

      public scala.PartialFunction<Object,scala.runtime.BoxedUnit> withLabel(String label, scala.PartialFunction<Object,scala.runtime.BoxedUnit> r, ActorContext context)
      Create a decorated logger which will append " in state " + label to each message it logs.