Skip to content
Fernando Cejas edited this page Dec 6, 2015 · 2 revisions

@RxLogObservable Annotation

  • @RxLogObservable: Annotated methods which return rx.Observables will print the following debug information when emitting items:
frodo_observable
    @RxLogObservable
    public Observable<List<MyDummyClass>> list() {
        return Observable.just(buildDummyList());
    }

@RxLogObservable.Scope Options

It is possible to narrow down the debug information shown by adding a debugging scope to @RxLogObservable annotation.

  • Scope.EVERYTHING: Logs stream data, schedulers and rx.Observable events. Default.
  • Scope.STREAM: Logs rx.Observable emitted items plus total execution time.
  • Scope.SCHEDULERS: Logs schedulers where the annotated rx.Observable operates on.
  • Scope.EVENTS: Logs rx.Observable events only.
  • Scope.NOTHING: Turns off logging for the annotated rx.Observable.
    @RxLogObservable(Scope.STREAM)
    public Observable<List<MyDummyClass>> list() {
        return Observable.just(buildDummyList());
    }
Clone this wiki locally