Reactor Netty log entire request at once using httpClient

196 Views Asked by At

So the query is I have a webclient call to be made. Under the hood, I have configured something like this for logging the request and response using httpClient's wiretap method.

But I believe this reads response in chunks and logs accordingly. But the logs are really messy like sample below

18:47:04.905 [reactor-http-nio-4] INFO  reactor.netty.http.client.HttpClient -  READ: 211B 
CD
,"httpHeaders":{},"httpStatusCode":400,{"body":[{"errorCode":"PROCESSING_HALTED","message":"The transaction was rolled back since another operation in the same transaction failed."}]
18:47:04.905 [reactor-http-nio-4] INFO  reactor.netty.http.client.HttpClient -  READ: 69B 
3F
,"httpHeaders":{},"httpStatusCode":400]}
18:47:04.905 [reactor-http-nio-4] INFO  reactor.netty.http.client.HttpClient - [df70615d-1, L:/172.30.141.56:57290 - R:goodyearmvp--beta.sandbox.my.salesforce.com/136.146.23.39:443] READ: 7B 
0

I don't really mind if the httpClient reads the response in chunks or at once, but is it possible to log the response at once, after the response is fully avaiable?

Thanks in advance!

0

There are 0 best solutions below