From d797de3b7951ba79c93fe8444bc0f9f6fff4dd87 Mon Sep 17 00:00:00 2001 From: yongsik Date: Thu, 27 Nov 2025 10:06:03 +0900 Subject: [PATCH 1/2] =?UTF-8?q?(feat)=20loki=20gradle=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index efbb9cc..b648c01 100644 --- a/build.gradle +++ b/build.gradle @@ -62,12 +62,16 @@ dependencies { // actuator implementation 'org.springframework.boot:spring-boot-starter-actuator' - //prometheus runtimeOnly "io.micrometer:micrometer-registry-prometheus" + //loki4j + implementation 'com.github.loki4j:loki-logback-appender:2.0.0' + implementation 'com.github.loki4j:loki-protobuf:0.0.2_pb4.31.0' + implementation 'org.apache.httpcomponents:httpclient:4.5.14' } + tasks.named('test') { useJUnitPlatform() } \ No newline at end of file From cb95efdefbaf5daf023a25b4a91f6783f1546b5d Mon Sep 17 00:00:00 2001 From: yongsik Date: Thu, 27 Nov 2025 12:20:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?(feat)=20logback=20xml=EC=B6=94=EA=B0=80=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 | 6 +++--- src/main/resources/logback-spring.xml | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/logback-spring.xml diff --git a/build.gradle b/build.gradle index b648c01..928b7c1 100644 --- a/build.gradle +++ b/build.gradle @@ -66,9 +66,9 @@ dependencies { runtimeOnly "io.micrometer:micrometer-registry-prometheus" //loki4j - implementation 'com.github.loki4j:loki-logback-appender:2.0.0' - implementation 'com.github.loki4j:loki-protobuf:0.0.2_pb4.31.0' - implementation 'org.apache.httpcomponents:httpclient:4.5.14' + implementation 'com.github.loki4j:loki-logback-appender:1.5.1' +// implementation 'com.github.loki4j:loki-protobuf:0.0.2_pb4.31.0' +// implementation 'org.apache.httpcomponents:httpclient:4.5.14' } diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..c0946dc --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,27 @@ + + + + + + + + + ${LOKI_URL} + + + + + + {"level":"%level","msg":"%msg"} + + + + + + + + + + \ No newline at end of file