From 133967fcf768ce314f2d88913430eb2ece33d96d Mon Sep 17 00:00:00 2001 From: kjy Date: Mon, 13 May 2024 12:51:24 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Logback=20ERROR,=20WARN=20=EB=A0=88?= =?UTF-8?q?=EB=B2=A8=20=EB=A1=9C=EA=B7=B8=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 3 +- log/errorLog.log | 0 log/warnLog.log | 0 src/main/resources/logback-spring.xml | 59 +++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 log/errorLog.log create mode 100644 log/warnLog.log create mode 100644 src/main/resources/logback-spring.xml diff --git a/build.gradle b/build.gradle index 1039d524..6b0f9f8f 100644 --- a/build.gradle +++ b/build.gradle @@ -50,7 +50,8 @@ dependencies { implementation 'io.springfox:springfox-swagger-ui:3.0.0' // logback - implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.9' + implementation group: 'ch.qos.logback', name: 'logback-access', version: '1.2.9' + implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.12' testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9' } diff --git a/log/errorLog.log b/log/errorLog.log new file mode 100644 index 00000000..e69de29b diff --git a/log/warnLog.log b/log/warnLog.log new file mode 100644 index 00000000..e69de29b diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..8107b0e2 --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,59 @@ + + + + + + + + ${LOG_PATTERN} + + + + + + + ERROR + ACCEPT + DENY + + + ${LOG_PATH}/${LOG_FILE_NAME}.log + + + ${LOG_PATTERN} + + + + ${LOG_PATH}/%d{yyyy-MM, aux}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}.log + 20GB + + + + + + + + WARN + ACCEPT + DENY + + + log/warnLog.log + + + ${LOG_PATTERN} + + + + ${LOG_PATH}/%d{yyyy-MM, aux}/warnLog.%d{yyyy-MM-dd}.log + 20GB + + + + + + + + + + \ No newline at end of file From 634891fa28e82e4f7f409fc97b91726b0d95a82c Mon Sep 17 00:00:00 2001 From: kjy Date: Mon, 13 May 2024 13:04:20 +0900 Subject: [PATCH 2/3] =?UTF-8?q?log=20file=20gitignore=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 41bad9a9..ee5cc7aa 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,8 @@ out/ ### config yml ### -application-**.yml \ No newline at end of file +application-**.yml + + +### log ### +*.log \ No newline at end of file From a88ae95a28880877277fdbd0bd93a7943190fd9d Mon Sep 17 00:00:00 2001 From: kjy Date: Mon, 27 May 2024 16:50:18 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=EC=A0=80=EC=9E=A5=20=EB=A3=A8?= =?UTF-8?q?=ED=8A=B8=20=EC=84=A4=EC=A0=95=20=EC=88=98=EC=A0=95,=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=ED=95=98=EB=8A=94=20=EC=96=91=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/logback-spring.xml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 8107b0e2..ea3d0d83 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,6 +1,7 @@ - + + @@ -17,7 +18,7 @@ DENY - ${LOG_PATH}/${LOG_FILE_NAME}.log + ${LOG_PATH}/${ERROR_LOG_FILE_NAME}.log ${LOG_PATTERN} @@ -25,7 +26,7 @@ ${LOG_PATH}/%d{yyyy-MM, aux}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}.log - 20GB + 2GB @@ -38,7 +39,7 @@ DENY - log/warnLog.log + ${LOG_PATH}/${WARN_LOG_FILE_NAME}.log ${LOG_PATTERN} @@ -46,7 +47,7 @@ ${LOG_PATH}/%d{yyyy-MM, aux}/warnLog.%d{yyyy-MM-dd}.log - 20GB + 2GB