diff --git a/src/main/kotlin/uoslife/servermeeting/global/config/WebLoggingConfig.kt b/src/main/kotlin/uoslife/servermeeting/global/config/WebLoggingConfig.kt new file mode 100644 index 00000000..0e8ff226 --- /dev/null +++ b/src/main/kotlin/uoslife/servermeeting/global/config/WebLoggingConfig.kt @@ -0,0 +1,21 @@ +package uoslife.servermeeting.global.config + +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.web.filter.CommonsRequestLoggingFilter + +@Configuration +class WebLoggingConfig { + + @Bean + fun commonsRequestLoggingFilter(): CommonsRequestLoggingFilter { + val filter = CommonsRequestLoggingFilter() + filter.setIncludeClientInfo(true) + filter.setIncludeHeaders(true) + filter.setHeaderPredicate { header -> header.lowercase() != "authorization" } + filter.setIncludePayload(true) + filter.setIncludeQueryString(true) + filter.setMaxPayloadLength(1000) + return filter + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 339cb259..82ae2ae7 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -18,7 +18,7 @@ spring: properties: hibernate: default_batch_fetch_size: 1000 - show_sql: true + show_sql: false format_sql: true flyway: enabled: true @@ -72,3 +72,10 @@ account: access: id: ${ACCOUNT_API_ACCESS_ID} secret: ${ACCOUNT_API_ACCESS_SECRET} + +logging: + level: + org: + springframework: + web: + filter: DEBUG