How to set enableLoggingRequestDetails='true' in Spring Boot How to set enableLoggingRequestDetails='true' in Spring Boot spring spring

How to set enableLoggingRequestDetails='true' in Spring Boot


For Spring Boot 2.1 and below use

logging.level.org.springframework.web=DEBUGspring.http.log-request-details=true

For Spring Boot 2.2 and above spring.http.log-request-details has been deprecated so use

logging.level.org.springframework.web=DEBUGspring.mvc.log-request-details=true

in your application.properties if you want to see loggingRequestDetails.

From the documentation:

Whether logging of (potentially sensitive) request details at DEBUGand TRACE level is allowed.


When using webflux and spring boot 2.3.0 the following properties can be set to log request details.

logging.level.org.springframework.web.server.adapter.HttpWebHandlerAdapter=DEBUGspring.codec.log-request-details=true


spring boot version is 2.2.6.RELEASE.This configuration item below helps me solve the problem.
spring.http.log-request-details=true