Skip to content

Instantly share code, notes, and snippets.

@b1a9id
Created March 21, 2021 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b1a9id/6aa0510c342752d8aa9fa37f3cd7f33c to your computer and use it in GitHub Desktop.
Save b1a9id/6aa0510c342752d8aa9fa37f3cd7f33c to your computer and use it in GitHub Desktop.
CommonsRequestLoggingFilterを使ったログ出力
@Configuration(proxyBeanMethods = false)
public class RequestLoggingFilterConfig {
@Bean
public CommonsRequestLoggingFilter logFilter() {
CommonsRequestLoggingFilter filter = new CommonsRequestLoggingFilter();
filter.setIncludeQueryString(true);
filter.setIncludePayload(true);
filter.setMaxPayloadLength(10000);
filter.setIncludeHeaders(false);
filter.setAfterMessagePrefix("Request data : ");
return filter;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment