DebuggableObservable
This implicit class provides debug* methods for observables, e.g.:
This implicit class provides debug* methods for observables, e.g.:
stream.debugWithName("MyStream").debugSpyStarts().debugLogEvents()
The result of the chain is an observable that you should use in place
of the original observable (stream
in this case).
The implicit conversion to this class is defined in the Observable companion object.
This is not a value class because DebuggableSignal needs to extend this. The performance penalty of one extra instantiation per debugged stream should not be noticeable.
Value members
Concrete methods
Trigger JS debugger for emitted events and errors if when
passes
Trigger JS debugger for emitted events and errors if when
passes
Trigger JS debugger for emitted errors (but not events) if when
passes
Trigger JS debugger for emitted errors (but not events) if when
passes
Trigger JS debugger for emitted events (but not errors) if when
passes
Trigger JS debugger for emitted events (but not errors) if when
passes
Trigger JS debugger when the observable starts and stops
Trigger JS debugger when the observable starts and stops
Log emitted events and errors if when
condition passes, using dom.console.log if useJsLogger
is true.
Log emitted events and errors if when
condition passes, using dom.console.log if useJsLogger
is true.
Log emitted errors (but not regular events) if when
condition passes
Log emitted errors (but not regular events) if when
condition passes
Log emitted events (but not errors) if when
condition passes, using dom.console.log if useJsLogger
is true.
Log emitted events (but not errors) if when
condition passes, using dom.console.log if useJsLogger
is true.
Execute fn on every emitted error (but not regular events)
Execute fn on every emitted error (but not regular events)
Execute callbacks on when the observable starts and stops
Execute callbacks on when the observable starts and stops
- Value Params
- startFn
topoRank => ()
Execute callbacks on when the observable starts
Execute callbacks on when the observable starts
- Value Params
- fn
topoRank => ()
Return the observable's topoRank. This does not affect the observable in any way.
Return the observable's topoRank. This does not affect the observable in any way.
Create a new observable that listens to the original, and
set the displayName of the new observable.
This is different from setDisplayName
.
Create a new observable that listens to the original, and
set the displayName of the new observable.
This is different from setDisplayName
.
If you say stream.debugWithName("foo").debugLog()
, the displayName
used by the logger will be "foo" verbatim, whereas if you say
stream.setDisplayName("foo").debugLog()
, the logger's displayName
will be "foo|Debug" – with a suffix – to differentiate it from
the "foo" displayName of stream
itself.