If you are seeing only part of your request payload, you need to call the setMaxPayloadLength
function as it defaults to showing only 50 characters in your request body. Also, setting setIncludeHeaders
to false is a good idea if you don't want to log your auth headers!
@Bean
public CommonsRequestLoggingFilter requestLoggingFilter() {
CommonsRequestLoggingFilter loggingFilter = new CommonsRequestLoggingFilter();
loggingFilter.setIncludeClientInfo(false);
loggingFilter.setIncludeQueryString(false);
loggingFilter.setIncludePayload(true);
loggingFilter.setIncludeHeaders(false);
loggingFilter.setMaxPayloadLength(500);
return loggingFilter;
}