I’m trying to create an Actor mixin trait (well, subclass), in order to override the various Actor lifecycle aroundX methods:
trait ActorLifecycleLogging extends Actor with ActorLogging {
private def logIt(msg: String) = ???
override protected[akka] def aroundPreStart(): Unit = {
logIt("preStart")
super.aroundPreStart()
}
}
Because these methods are protected[akka], it seems I have to put it in an akka.actor sub-package?
I really don’t want my code polluting the akka namespace. Am I missing a better way to accomplish this?