code: public static <T> Observable.Transformer<T, T> applyLogging(final String name, final Logger logger){
          return new Observable.Transformer<T, T>() {
              @Override
              public Observable<T> call(Observable<T> observable) {
                  return observable
                          .doOnNext(new Action1<T>() {
                              @Override
                              public void call(T t) {
                                  logger.log(Log.DEBUG, "[%s] onNext(%s)", name, t);
                              }
                          })
                          .doOnError(new Action1<Throwable>() {
                              @Override
                              public void call(Throwable throwable) {
                                  logger.log(throwable, Log.DEBUG, "[%s] onError()", name);
                              }
                          })
                          .doOnCompleted(new Action0() {
                              @Override
                              public void call() {
                                  logger.log(Log.DEBUG, "[%s] onCompleted()", name);
                              }
                          });
              }
          };
      }
docs: <p>
  Add a log statement to the onNext, onError, and onCompleted parts of an observable
  </p>
  
  @param name      the log tag name
  @param <T>       the transformation type
  @return          the transformer