APISonar


reactor.core.publisher.Flux.log

> reactor > core > publisher > Flux > log
reactor APIs core APIs publisher APIs Flux APIs log APIs

Example 1
private Flux<?> get(WebClient client) {
		Flux<?> result = client.get().uri(this.props.getSource().getUrl()).exchange()
				.flatMap(this::transform).repeat();
		if (this.props.isDebug()) {
			result = result.log();
		}
		return result.onErrorResume(TerminateException.class, error -> Mono.empty());
	}
Example 2
public void processUsingApproachFivePublishingToDifferentSingleThreads(Flux<Foo> flux) {
        logger.info("starting approach five-single!");
        flux = flux.log()
            .subscribeOn(Schedulers.newSingle("five-single-starter"));
        flux = concatAndSubstringFooName(flux).publishOn(Schedulers.newSingle("five-single-foo"));
        flux = concatAndSubstringFooName(flux);
        flux = divideFooQuantity(flux);
        flux = reportResult(flux, "FIVE-SINGLE").publishOn(Schedulers.newSingle("five-single-bar"));
        flux = concatAndSubstringFooName(flux).doOnError(error -> {
            logger.error("Approach 5-single failed!", error);
        });
        flux.subscribe();
    }