From 319ffef596b69228d057fa0319871b0909384886 Mon Sep 17 00:00:00 2001 From: HoYeon Lee Date: Tue, 16 Jul 2024 23:07:14 +0900 Subject: [PATCH] =?UTF-8?q?DRAW-111=20feat:=20Log=20Path=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- .../kotlin/com/xorker/draw/log/ApiLoggingFilter.kt | 1 - .../logging/src/main/resources/logback-appender.xml | 10 +++++++--- support/logging/src/main/resources/logback-local.xml | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index fd00d92b..3eba56ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +log/ .gradle build/ !gradle/wrapper/gradle-wrapper.jar @@ -36,4 +37,4 @@ bin/ .vscode/ ### Mac OS ### -.DS_Store \ No newline at end of file +.DS_Store diff --git a/app/api/src/main/kotlin/com/xorker/draw/log/ApiLoggingFilter.kt b/app/api/src/main/kotlin/com/xorker/draw/log/ApiLoggingFilter.kt index fb18cfce..e360d294 100644 --- a/app/api/src/main/kotlin/com/xorker/draw/log/ApiLoggingFilter.kt +++ b/app/api/src/main/kotlin/com/xorker/draw/log/ApiLoggingFilter.kt @@ -24,7 +24,6 @@ class ApiLoggingFilter : Filter { try { chain.doFilter(request, response) } finally { - logger.info("${generateRequestLog(request)}\n${generateResponseLog(response)}") response.copyBodyToResponse() } diff --git a/support/logging/src/main/resources/logback-appender.xml b/support/logging/src/main/resources/logback-appender.xml index 8ade8f0e..782cb717 100644 --- a/support/logging/src/main/resources/logback-appender.xml +++ b/support/logging/src/main/resources/logback-appender.xml @@ -4,6 +4,10 @@ name="LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}][%-5level][%thread][%logger{1}] %msg%n" /> + @@ -24,7 +28,7 @@ - log/console.txt + ${LOG_PATH}/console.txt log/console-%d{yyyy-MM-dd}.%i.txt 100MB @@ -37,7 +41,7 @@ - log/api.txt + ${LOG_PATH}/api.txt log/api-%d{yyyy-MM-dd}.%i.txt 100MB @@ -50,7 +54,7 @@ - log/ws.txt + ${LOG_PATH}/ws.txt log/ws-%d{yyyy-MM-dd}.%i.txt 100MB diff --git a/support/logging/src/main/resources/logback-local.xml b/support/logging/src/main/resources/logback-local.xml index 4475555b..4e020ceb 100644 --- a/support/logging/src/main/resources/logback-local.xml +++ b/support/logging/src/main/resources/logback-local.xml @@ -4,6 +4,7 @@ +