From 67991abc8ebefb0423d4a847f542672061d0e4bb Mon Sep 17 00:00:00 2001 From: juha Date: Wed, 31 Jul 2024 16:01:06 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=20=EB=AA=A8=EB=8B=88?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20=ED=99=98=EA=B2=BD=20=EA=B5=AC=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/build.gradle | 1 + server/src/main/resources/application.yml | 17 +++++++++++++++++ server/src/main/resources/logback-spring.xml | 19 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 server/src/main/resources/logback-spring.xml diff --git a/server/build.gradle b/server/build.gradle index 26f6ec262..526c3640e 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -27,6 +27,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.springframework.boot:spring-boot-starter-actuator' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.mysql:mysql-connector-j' diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml index faf7a36f1..75cde1cc5 100644 --- a/server/src/main/resources/application.yml +++ b/server/src/main/resources/application.yml @@ -22,6 +22,23 @@ cors: max-age: 3600 allowed-origins: http://localhost:3000, https://haengdong.pro, https://dev.haengdong.pro, https://app.haengdong.pro +management: + endpoints: + web: + exposure: + include: logfile + +logging: + level: + root: info + org.springframework.web: debug + server.haengdong: debug + + file: + name: logs/spring-boot-application.log + path: logs + config: classpath:logback-spring.xml + --- spring: diff --git a/server/src/main/resources/logback-spring.xml b/server/src/main/resources/logback-spring.xml new file mode 100644 index 000000000..204130e8c --- /dev/null +++ b/server/src/main/resources/logback-spring.xml @@ -0,0 +1,19 @@ + + + logs/spring-boot-application.log + + logs/spring-boot-application.%d{yyyy-MM-dd}.log + 30 + + + %d{yyyy-MM-dd HH:mm:ss} - %msg%n + + + + + + + + + +