File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
services/alarm-logger/src/main
java/org/phoebus/alarm/logging/rest 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 .alarm .logging .rest ;
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 @@ -34,4 +34,8 @@ use_dated_index_names=true
3434date_span_units =M
3535
3636# Size of the thread pool for message and command loggers. Two threads per topic/configuration are required
37- thread_pool_size =4
37+ thread_pool_size =4
38+
39+ # ############################# REST Logging ###############################
40+ # DEBUG level will log all requests and responses to and from the REST end points
41+ logging.level.org.springframework.web.filter.CommonsRequestLoggingFilter =INFO
You can’t perform that action at this time.
0 commit comments