How to configure Akka.NET to register all messages received by actors?

I am trying to get Akka.NET to log all messages received by actors, but cannot make it work. Here is my configuration (I am using projects from Akka.NET bootcamp):

akka { stdout-loglevel = DEBUG loglevel = DEBUG log-config-on-start = on actor { debug { receive = on # log any received message autoreceive= on # log automatically received messages, eg PoisonPill lifecycle = on # log actor lifecycle changes event-stream = on # log subscription changes for Akka.NET event stream unhandled = on # log unhandled messages sent to actors } } } 

I see that the configuration works for other actions (I see debugging messages about the initialization and shutdown of the actors system), but nothing from the actual messages sent to the actors. I have tried both C # and F # examples.

+7
c # logging
source share
1 answer

Found what was missing. This is not enough to configure debugging logging, the actor must implement a marker interface (without methods). ILogReceive:

 class ConsoleWriterActor : UntypedActor, ILogReceive 
+18
source share

All Articles