akka-rabbitmq
akka-rabbitmq copied to clipboard
Logging Issue
I have a problem with the logging implementation on the Connection and Channel Actors. As they use the same logger as the ActorSystem I cannot change it's level to be different from my ActorSystem?
Is there a way to set the level for the Actors by themselves?
I don't think so. For that we probably need to create loggers inside of those actors. We would have to check if we can use the existing eco-system of Akka to do this and see if it supports log levels (as we prefer not to include more dependencies on logging libraries).
Digging a bit deeper, it seems you can add your own logger to the akka.loggers configuration, after which akka will subscribe it to the event bus. This gives you the flexibility you need. More details are here: https://doc.akka.io/docs/akka/current/logging.html#loggers
An example can be found in akka.event.jul.JavaLogger (in akka actors library)