From 0896db871e3f96f0b1538ce53562fd12acb424fe Mon Sep 17 00:00:00 2001 From: Anton Subbotin Date: Fri, 15 Mar 2024 11:43:18 +0000 Subject: [PATCH] ES-2058: Add Corda container logging configuration (#99) - 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 e5b0ac2d..3cfdacc6 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 909222c8..4e297be8 100644 --- a/config/log4j2.xml +++ b/config/log4j2.xml @@ -46,6 +46,7 @@ + \ No newline at end of file