Skip to content
levkhomich edited this page Dec 25, 2014 · 1 revision

Trace logging functionality allows you to pipe log records to traces.

To use this feature, mix your actor with TracingActorLogging (instead of ActorLogging) and call any log's method. Also you will need to add TracingLogger to the list of akka loggers:

loggers += "com.github.levkhomich.akka.tracing.TracingLogger"

Short example:

class TestActor extends TracingActorLogging with ActorTracing {
  override def receive: Receive = {
    case msg: SomeMessageWithTracingSupport =>
      // next call will add log record to message's trace
      log.debug("received message " + msg)
      ???
  }
}