Skip to content

Commit

Permalink
ES-2058: Add Corda container logging configuration (#77)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
anton-subbotin authored Mar 15, 2024
1 parent b819108 commit 2278f8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/combined-worker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -69,4 +75,4 @@ services:
ports:
- 8888:8888
- 7004:7004
- 5005:5005
- 5005:5005
1 change: 1 addition & 0 deletions config/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

<root level="debug">
<AppenderRef ref="App" level="info"/>
<AppenderRef ref="Console" level="${env:CONSOLE_LOG_LEVEL:-info}"/>
</root>
</Loggers>
</Configuration>

0 comments on commit 2278f8d

Please sign in to comment.