DebugInterceptor

Installs debug interceptors on an StateActor that log every action dispatch and state update, building a traceable timeline of what happened and why.

Usage:

val actor = Actor(initialState, scope)
DebugInterceptor.install(actor, name = "Identity")

Output example:

[Identity] action  → Identify(userId=user_123)
[Identity] update → Identify | 2ms
[Identity] update → AttributesMerged | 0ms
[Identity] action → ResolveSeed(userId=user_123)
[Identity] update → SeedResolved | 1ms

Functions

Link copied to clipboard
fun <Ctx, S> install(actor: StateActor<Ctx, S>, name: String, scope: LogScope = LogScope.superwallCore, level: LogLevel = LogLevel.debug)

Install debug logging on an StateActor.