From 1e42f24e3ae2536aa70f2503e6af0c417502dd7c Mon Sep 17 00:00:00 2001 From: bivashy Date: Sun, 14 Sep 2025 01:58:32 +0500 Subject: [PATCH] Use logstash as logging destination --- compose.yml | 3 +++ pom.xml | 6 ++++++ src/main/resources/logback.xml | 11 +++++++++++ 3 files changed, 20 insertions(+) create mode 100644 src/main/resources/logback.xml diff --git a/compose.yml b/compose.yml index 6a1b293..4e5177a 100644 --- a/compose.yml +++ b/compose.yml @@ -6,7 +6,10 @@ services: env_file: .env networks: - anyame-shared + - elk-network networks: anyame-shared: external: true + elk-network: + external: true diff --git a/pom.xml b/pom.xml index 4edb349..59a0407 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,7 @@ 4.0.0 2.8.9 4.3.0 + 8.1 @@ -66,6 +67,11 @@ spring-cloud-starter-netflix-eureka-client ${spring-eureka-client.version} + + net.logstash.logback + logstash-logback-encoder + ${logstash-logback-encoder.version} + org.springframework.boot diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..e21863d --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,11 @@ + + + logstash:5044 + + + + + + + +