File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
services/save-and-restore/src/main
java/org/phoebus/service/saveandrestore/web/controllers Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1+ package org .phoebus .service .saveandrestore .web .controllers ;
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 RequestLoggingFilterConfig {
9+
10+ @ Bean
11+ public CommonsRequestLoggingFilter logFilter () {
12+ CommonsRequestLoggingFilter filter
13+ = new CommonsRequestLoggingFilter ();
14+ filter .setIncludeQueryString (true );
15+ filter .setIncludePayload (true );
16+ filter .setMaxPayloadLength (10000 );
17+ filter .setIncludeHeaders (false );
18+ filter .setAfterMessagePrefix ("REQUEST DATA : " );
19+ return filter ;
20+ }
21+ }
Original file line number Diff line number Diff line change @@ -3,4 +3,8 @@ spring.datasource.type=com.zaxxer.hikari.HikariDataSource
33spring.datasource.hikari.maximumPoolSize =10
44spring.datasource.hikari.connectionTestQuery =SELECT 1
55app.version =@project.version@
6- 6+ app.name =@project.name@
7+
8+ # ############################# REST Logging ###############################
9+ # DEBUG level will log all requests and responses to and from the REST end points
10+ logging.level.org.springframework.web.filter.CommonsRequestLoggingFilter =INFO
You can’t perform that action at this time.
0 commit comments