You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the changes to close #4634 fixes "inheritance" of the logger, I would like to be able to configure a logger for any new actor in an actor system--not just the root actor.
My use case is that I want to use debug for my logger--but each actor should have its own namespace.
It'd also make sense to add it to the invoke property API, but if I put on my API design hat, I'd be wary of the number of properties here. Still, I currently have no workaround for the invoke case, so I just avoid using it for machine-type actors.
Another Idea
Another approach would be a new "logger factory" property in the root actor options. If this factory is executed for each new actor in the system, and presumably given the usual suspects like self, context, etc., I would be able to use it to do all manner of terrible things.
If there's no interest, I could certainly be encouraged to implement my own log(). 😄
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
While the changes to close #4634 fixes "inheritance" of the
logger
, I would like to be able to configure a logger for any new actor in an actor system--not just the root actor.My use case is that I want to use debug for my logger--but each actor should have its own namespace.
My current workaround is to monkeypatch.
One Idea
Allow a
logger
option onspawn
andspawnChild
.It'd also make sense to add it to the
invoke
property API, but if I put on my API design hat, I'd be wary of the number of properties here. Still, I currently have no workaround for theinvoke
case, so I just avoid using it for machine-type actors.Another Idea
Another approach would be a new "logger factory" property in the root actor options. If this factory is executed for each new actor in the system, and presumably given the usual suspects like
self
,context
, etc., I would be able to use it to do all manner of terrible things.If there's no interest, I could certainly be encouraged to implement my own
log()
. 😄Beta Was this translation helpful? Give feedback.
All reactions