Java Code Examples for reactor.core.publisher.Flux#log()

The following examples show how to use reactor.core.publisher.Flux#log() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpSupplier.java    From spring-cloud-function with Apache License 2.0 5 votes vote down vote up
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
Source File: FooService.java    From tutorials with MIT License 5 votes vote down vote up
public void processFoo(Flux<Foo> flux) {
    flux = FooNameHelper.concatFooName(flux);
    flux = FooNameHelper.substringFooName(flux);
    flux = flux.log();
    flux = FooReporter.reportResult(flux);
    flux = flux.doOnError(error -> {
        logger.error("The following error happened on processFoo method!", error);
    });
    flux.subscribe();
}