From 2278f8d05b6854e87d122cceb48ef83692b3fe7a Mon Sep 17 00:00:00 2001 From: Anton Subbotin Date: Fri, 15 Mar 2024 11:43:55 +0000 Subject: [PATCH] ES-2058: Add Corda container logging configuration (#77) - logs go to both console and files - console logs are available via `docker logs` - file logs are at the same location used by CSDE template - default configurations of logging level and debug logging are provided explicitly, allowing users to modify as needed - all of the above tested locally. --- config/combined-worker-compose.yaml | 8 +++++++- config/log4j2.xml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/combined-worker-compose.yaml b/config/combined-worker-compose.yaml index e5b0ac2..3cfdacc 100644 --- a/config/combined-worker-compose.yaml +++ b/config/combined-worker-compose.yaml @@ -54,8 +54,14 @@ services: - postgresql - kafka - kafka-create-topics + volumes: + - ../config:/config + - ../logs:/logs environment: JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 + LOG4J_CONFIG_FILE: config/log4j2.xml + CONSOLE_LOG_LEVEL: info + ENABLE_LOG4J2_DEBUG: false command: [ "-mbus.busType=KAFKA", "-mbootstrap.servers=kafka:29092", @@ -69,4 +75,4 @@ services: ports: - 8888:8888 - 7004:7004 - - 5005:5005 \ No newline at end of file + - 5005:5005 diff --git a/config/log4j2.xml b/config/log4j2.xml index 909222c..4e297be 100644 --- a/config/log4j2.xml +++ b/config/log4j2.xml @@ -46,6 +46,7 @@ + \ No newline at end of file