From 76c4adfefb5a9e9df521d6f24e0f39db11f13283 Mon Sep 17 00:00:00 2001 From: csct3434 Date: Sat, 30 Mar 2024 02:37:33 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20logback-awslogs-appender=20?= =?UTF-8?q?=EC=9D=98=EC=A1=B4=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle b/build.gradle index 20159cd..22d2f71 100644 --- a/build.gradle +++ b/build.gradle @@ -45,6 +45,9 @@ dependencies { runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3' runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3' + // logback-awslogs-appender + implementation "ca.pjer:logback-awslogs-appender:1.6.0" + testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' testImplementation 'io.rest-assured:rest-assured' From 9dfd4f15649a38816610252c5ad38e0cba17e184 Mon Sep 17 00:00:00 2001 From: csct3434 Date: Sat, 30 Mar 2024 02:39:08 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20dev=20=ED=94=84=EB=A1=9C=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index b138668..1f22cca 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -29,4 +29,9 @@ spring: on-profile: prod import: secret/application-prod-config.yml - +--- +spring: + config: + activate: + on-profile: dev + import: secret/application-dev-config.yml From 6986df9016a2a634e17158805f6f36fac45c9dc9 Mon Sep 17 00:00:00 2001 From: csct3434 Date: Sat, 30 Mar 2024 02:41:17 +0900 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20=EC=A4=91=EC=95=99=20=EC=A7=91?= =?UTF-8?q?=EC=A4=91=EC=8B=9D=20=EB=A1=9C=EA=B9=85=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 운영 환경에서의 분산된 로그를 AWS CloudWatch Log Group으로 전송하도록 변경 --- src/main/resources/logback-spring.xml | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/main/resources/logback-spring.xml diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..5932209 --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + + + + + + [%thread] [%level] [%file:%line] - %msg%n + + ec2-asg + application-log- + ap-northeast-2 + 50 + 30000 + 5000 + 30 + ${AWS_ACCESS_KEY} + ${AWS_SECRET_KEY} + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file