An xs.ActorRef (or xs.Actor)
Options
The original actor
, but modified
This function is called internally (with its own instrumentation, as
appropriate) by xstate-audition on the root Actor
, and for every
spawned Actor. That said, it may be useful otherwise to have granular
control (e.g., when paired with waitForSpawn()
).
Utility to mutate an existing TActor allowing addition of an inspector and/or new logger.
Inspectors are additive, so adding a new inspector is not destructive. Inspectors are applied across the entire system; there is no way to inspect only one actor.
The logger needs to be replaced with a new function that calls the original logger and the new logger. If the
ActorRef
is a root actor (the one created viacreateActor()
), the logger will be set at the system level; otherwise it will only be set for the particular Actor.Warning: If you use this function and plan using unpatchActor, modifying the
ActorRef
's logger via external means will result in the loss of those modifications.