File tree Expand file tree Collapse file tree
online-bookstore/online-bookstore-boot/src/main
java/es/pedrazamiguez/onlinebookstore/config/logging Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package es .pedrazamiguez .onlinebookstore .config .logging ;
2+
3+ import org .springframework .context .annotation .Bean ;
4+ import org .springframework .context .annotation .Configuration ;
5+ import org .springframework .web .filter .CommonsRequestLoggingFilter ;
6+
7+ @ Configuration
8+ public class RequestLoggingConfiguration {
9+
10+ @ Bean
11+ public CommonsRequestLoggingFilter requestLoggingFilter () {
12+ CommonsRequestLoggingFilter loggingFilter = new CommonsRequestLoggingFilter ();
13+ loggingFilter .setIncludeClientInfo (true );
14+ loggingFilter .setIncludeHeaders (true );
15+ loggingFilter .setIncludeQueryString (true );
16+ loggingFilter .setIncludePayload (true );
17+ loggingFilter .setMaxPayloadLength (10000 );
18+ loggingFilter .setAfterMessagePrefix ("REQUEST DATA: " );
19+ return loggingFilter ;
20+ }
21+
22+ }
Original file line number Diff line number Diff line change @@ -16,9 +16,10 @@ spring:
1616 show_sql : true
1717 properties.hibernate.format_sql : true
1818
19- logging.level :
20- org.hibernate :
21- type : trace
19+ logging :
20+ level :
21+ org.hibernate.type : trace
22+ org.springframework.web.filter.CommonsRequestLoggingFilter : debug
2223
2324pricing :
2425 discount :
You can’t perform that action at this time.
0 commit comments