Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RxJava log exception only subscriber
public static class LogExOnlySubscriber<T> extends Subscriber<T> {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable ex) {
Timber.e(ex, "Your RX IZ FAILING YO!");
}
@Override
public void onNext(T t) {
}
}
// Usage:
// Observable.just(something)
// ..
// .subscribe(new LogExOnlySubscriber();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.