From 4e476a09452f26aa8dfd0c9a9e8cf120967d8859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=ED=98=84=EC=8A=B9?= Date: Wed, 22 May 2024 09:09:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=20=EA=B0=84=EB=8B=A8?= =?UTF-8?q?=ED=99=94=20(#161)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global/config/WebLoggingConfig.kt | 21 +++++++++++++++++++ src/main/resources/application.yml | 9 +++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/main/kotlin/uoslife/servermeeting/global/config/WebLoggingConfig.kt 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