Skip to content

Instantly share code, notes, and snippets.

@emmaguy
Last active August 29, 2015 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emmaguy/28d91fddf5c9a0d0c434 to your computer and use it in GitHub Desktop.
Save emmaguy/28d91fddf5c9a0d0c434 to your computer and use it in GitHub Desktop.
RxJava debug
RxJavaPlugins.getInstance().registerObservableExecutionHook(new DebugHook(new DebugNotificationListener() {
public Object onNext(DebugNotification n) {
Timber.v("onNext on " + n);
return super.onNext(n);
}
public Object start(DebugNotification n) {
Timber.v("start on " + n);
return super.start(n);
}
public void complete(Object context) {
super.complete(context);
Timber.v("onNext on " + context);
}
public void error(Object context, Throwable e) {
super.error(context, e);
Timber.v("error on " + context);
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment