Skip to content

Commit

Permalink
fix: enable request logging to simplify debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed Apr 3, 2024
1 parent badc79e commit 64ec046
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package de.caritas.cob.videoservice.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.CommonsRequestLoggingFilter;

@Configuration
public class LoggingConfig {

@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;
}
}
3 changes: 2 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ spring.security.oauth2.resourceserver.jwt.jwk-set-uri: https://localhost/auth/re
spring.jwt.auth.converter.resource-id: app
spring.jwt.auth.converter.principal-attribute: preferred_username

springdoc.api-docs.enabled=false
springdoc.api-docs.enabled=false
logging.level.org.springframework.web.filter.CommonsRequestLoggingFilter=DEBUG

0 comments on commit 64ec046

Please sign in to comment.