From 901c25acf8b383798d882c74b7a85ceaccdc3f3c Mon Sep 17 00:00:00 2001 From: Juhwan Kim <13selfesteem91@naver.com> Date: Tue, 13 Aug 2024 10:27:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20LogBack=20=EB=A1=A4=EB=A7=81=20?= =?UTF-8?q?=EC=A0=95=EC=B1=85=20=EC=88=98=EC=A0=95,=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=20=EB=A0=88=EB=B2=A8=EC=97=90=20=EB=94=B0=EB=A5=B8=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC=20(#332)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Logback 로그 레벨 분리 * feat: Lockback 로그 레벨 분리 --------- Co-authored-by: Arachneee --- server/src/main/resources/application.yml | 12 --- server/src/main/resources/config | 2 +- server/src/main/resources/logback-spring.xml | 88 ++++++++++++++++++-- 3 files changed, 81 insertions(+), 21 deletions(-) diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml index 6a8bd77af..2ae503547 100644 --- a/server/src/main/resources/application.yml +++ b/server/src/main/resources/application.yml @@ -42,17 +42,6 @@ management: exposure: include: health, metrics, logfile -logging: - level: - root: debug - org.springframework.web: debug - server.haengdong: debug - - file: - name: logs/spring-boot-application.log - path: logs - config: classpath:logback-spring.xml - server: servlet: encoding: @@ -75,4 +64,3 @@ spring: import: classpath:config/application-dev.yml activate: on-profile: dev - diff --git a/server/src/main/resources/config b/server/src/main/resources/config index 13959710c..141eb40e8 160000 --- a/server/src/main/resources/config +++ b/server/src/main/resources/config @@ -1 +1 @@ -Subproject commit 13959710cc6d19309aafbc87681d25b9060d935d +Subproject commit 141eb40e871cc9c3e172af46db29d90ac6448180 diff --git a/server/src/main/resources/logback-spring.xml b/server/src/main/resources/logback-spring.xml index 7fa3da153..12e5940d4 100644 --- a/server/src/main/resources/logback-spring.xml +++ b/server/src/main/resources/logback-spring.xml @@ -1,8 +1,71 @@ - - logs/spring-boot-application.log + + + + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + + + + + + ERROR + ACCEPT + DENY + + logs/spring-boot-application-error.log + + logs/spring-boot-application-error.%d{yyyy-MM-dd}.log + 30 + + + + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + + + + + + WARN + ACCEPT + DENY + + logs/spring-boot-application-warn.log + + logs/spring-boot-application-warn.%d{yyyy-MM-dd}.log + 30 + + + + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + + + + + + INFO + ACCEPT + DENY + + logs/spring-boot-application-info.log + + logs/spring-boot-application-info.%d{yyyy-MM-dd}.log + 30 + + + + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + + + + + + DEBUG + ACCEPT + DENY + + logs/spring-boot-application-debug.log - logs/spring-boot-application.%d{yyyy-MM-dd}.log + logs/spring-boot-application-debug.%d{yyyy-MM-dd}.log 30 @@ -11,10 +74,19 @@ - - - + + + + + - - + + + + + + + + +