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 + + + + + + + + + +