From 8cd6835f507a620a20db19ee2d794faaa4098439 Mon Sep 17 00:00:00 2001 From: Jaewon Lee Date: Thu, 24 Oct 2024 08:57:13 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EB=A1=9C=EA=B7=B8=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=A0=80=EC=9E=A5=20=EC=84=A4=EC=A0=95=EC=9A=A9=20=20logbac?= =?UTF-8?q?k-spring.yml=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++ src/main/resources/logback-spring.xml | 45 +++++++++++++++++++ .../resources/logback-variables.properties | 3 ++ 3 files changed, 52 insertions(+) create mode 100644 src/main/resources/logback-spring.xml create mode 100644 src/main/resources/logback-variables.properties diff --git a/.gitignore b/.gitignore index 3abe6631..8aaf6f38 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ out/ ### etc ### .DS_Store +### Project ### **/main/generated/ **/resources/.env @@ -46,3 +47,6 @@ out/ !**/resources/.env.example **/resources/app/apple/*.p8 + +### Logs ### +logs/** diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..6f262243 --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + %clr(%d{${LOG_DATEFORMAT_PATTERN}}){magenta} %clr([%thread]){blue} %clr(%-5level){} %clr([%logger{0}:%line]){cyan} : %msg %n + + + + + + + + ${LOG_DATEFORMAT_PATTERN} + + Asia/Seoul + true + + + false + + + + + ${LOG_PATH}/${ToMonth}/${ToDay}_${LOG_FILE_NAME}.log + + + ${LOG_PATH}/%d{yyyy-MM}/%d{yyyy-MM-dd}_${LOG_FILE_NAME}_%i.log + + 10MB + 30 + + + + + + + + + diff --git a/src/main/resources/logback-variables.properties b/src/main/resources/logback-variables.properties new file mode 100644 index 00000000..b99ad312 --- /dev/null +++ b/src/main/resources/logback-variables.properties @@ -0,0 +1,3 @@ +LOG_PATH = ./logs +LOG_FILE_NAME = runus +LOG_DATEFORMAT_PATTERN = yyyy-MM-dd HH:mm:ss.SSSX