Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Gorzala committed Dec 15, 2023
1 parent 1c9120b commit 0d32b53
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public ChatsDto getChats(UUID dancerId) {
}

public ChatDto createChat(CreateChatDto createChatDto) {
log.info("now creating");
return webClient.post()
.uri(uriBuilder -> uriBuilder
.path(BASE_URI)
Expand Down Expand Up @@ -118,20 +119,5 @@ private ExchangeFilterFunction buildRetryExchangeFilterFunction() {
.retryWhen(Retry.backoff(3, Duration.ofMillis(500)));
}

private ExchangeFilterFunction logRequest() {
return ExchangeFilterFunction.ofRequestProcessor(clientRequest -> {
if (log.isDebugEnabled()) {
StringBuilder sb = new StringBuilder("Request: \n");
//append clientRequest method and url
clientRequest
.headers()
.forEach((name, values) -> values.forEach(value -> sb.append(value)/* append header key/value */));
log.info(sb.toString());
}
return Mono.just(clientRequest);
});
}


}

0 comments on commit 0d32b53

Please sign in to comment.