etgryphon/stativus — Issue #16: More detailed logging
Author: johnnywengluu
Created: 2011-11-01 23:13:24+00:00
State: open

When an event is sent but there is no handler for it (using statechart.sendEvent() and not this.sendEvent()), that event is not logged in the console.

Wouldn't it be better if the event is logged, and then log the event handler/s that is handling the event.

Eg.

statechart.sendEvent("showUser", "Foo");

will show this log if no handler is there:

EVENT: Statechart fires [showUser] with 1 argument ["Foo"]

And if there is a handler:

EVENT: Statechart fires [showUser] with 1 argument ["Foo"]
HANDLER: StateB handled the event
HANDLER: StateA handled the event

Something like that.

This would give us more of what is happening so we don't need to console.log() in some places to figure things out.