2

Can you help me re-write the below snippet as the bootstrap and HttpClient.from(tcp) are deprecated:

TcpClient.bootstrap(bootstrap -> BootstrapHandlers.updateLogSupport(bootstrap, new HttpLoggingHandler()))

webClient = WebClient.builder().clientConnector(new ReactorClientHttpConnector(HttpClient.from(tcpClient)))

Srini
  • 21
  • 1
  • Does this answer your question? [how to log Spring 5 WebClient call](https://stackoverflow.com/questions/46154994/how-to-log-spring-5-webclient-call) – Abhijit Sarkar May 01 '23 at 06:19

1 Answers1

0

Try Custom Logger:

CustomLogger logger = new CustomLogger(TcpClient.class);         
TcpClient tcpClient = TcpClient.create().doOnRequest((request, connection) -> 
    {
     connection.addHandlerFirst(logger);
    });