android10 / frodo

Android Library for Logging RxJava Observables and Subscribers.
1.48k stars 101 forks source link

Logging for anonymus subscriber #15

Closed iammert closed 8 years ago

iammert commented 8 years ago

I see that we can use RxLogSubscriber annotation for Subscriber classes,Is there any suggestion for anonymus subscriber?

android10 commented 8 years ago

Can you elaborate a little bit more? What is your use case or problem you are facing?

iammert commented 8 years ago
      subscription = getRadioListUsecase.getRadioList()
                .subscribe(new Subscriber<RadioWrapper>() {
                    @Override
                    public void onCompleted() {

                    }

                    @Override
                    public void onError(Throwable e) {

                    }

                    @Override
                    public void onNext(RadioWrapper radioWrapper) {
                        radioListView.onListLoaded(radioWrapper);
                        radioListView.dismissLoading();
                    }
                });

This is snippet from my Presenter class. Can i use RxLogSubscriber on anonymus subscriber?

android10 commented 8 years ago

@iammert I thought you were meaning when you call subscribe() without any parameters which internally creates an anonymous Subscriber(). Anyway, either case is not possible at the moment with frodo. I will keep it in mind for future versions although I have to investigate a little bit more and I cannot assure that this is doable.

If you come up with a solutions, I will really appreciate a PR :smile:

android10 commented 8 years ago

Closing the ticket for now. Thanks for the feedback.