From 9c965b95c90947d2048f879e7e55c7ef808c9993 Mon Sep 17 00:00:00 2001 From: Serhii Shymkiv Date: Mon, 11 Dec 2023 15:22:34 +0200 Subject: [PATCH] Mina processes loggging level configuration exposure. --- DockerHub.md | 3 +++ configuration/Dockerfile | 3 ++- scripts/spinup-testnet.sh | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/DockerHub.md b/DockerHub.md index d16bba9..aa69d79 100644 --- a/DockerHub.md +++ b/DockerHub.md @@ -51,6 +51,7 @@ Before the Mina network can be used in your job or jobs steps, it must reach the docker run --rm --pull=always -it \ --env NETWORK_TYPE="single-node" \ --env PROOF_LEVEL="none" \ + --env LOG_LEVEL="Info" \ -p 3085:3085 \ -p 5432:5432 \ -p 8080:8080 \ @@ -97,6 +98,7 @@ jobs: env: NETWORK_TYPE: 'single-node' PROOF_LEVEL: 'none' + LOG_LEVEL: 'Info' ports: - 3085:3085 - 5432:5432 @@ -169,6 +171,7 @@ jobs: docker run --rm --pull=always -it \ --env NETWORK_TYPE="multi-node" \ --env PROOF_LEVEL="none" \ + --env LOG_LEVEL="Info" \ -p 4001:4001 \ -p 4006:4006 \ -p 5001:5001 \ diff --git a/configuration/Dockerfile b/configuration/Dockerfile index 967b0cd..18392cb 100644 --- a/configuration/Dockerfile +++ b/configuration/Dockerfile @@ -47,7 +47,8 @@ EXPOSE 8282 ENV RUN_ARCHIVE_NODE="true" ENV NETWORK_TYPE="single-node" -ENV PROOF_LEVEL=full +ENV PROOF_LEVEL="full" +ENV LOG_LEVEL="Trace" ENV MINA_LIBP2P_HELPER_PATH=/root/libp2p_helper ENV POSTGRES_USER=postgres ENV POSTGRES_PASSWORD=postgres diff --git a/scripts/spinup-testnet.sh b/scripts/spinup-testnet.sh index 9b30114..5c43962 100755 --- a/scripts/spinup-testnet.sh +++ b/scripts/spinup-testnet.sh @@ -106,7 +106,7 @@ if [[ $NETWORK_TYPE == "single-node" ]]; then echo "" ${HOME}/archive.exe run \ --config-file ${GENESIS_LEDGER_CONFIG_FILE} \ - --log-level Trace \ + --log-level ${LOG_LEVEL} \ --postgres-uri postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${RDBMS_PORT}/${POSTGRES_DB} \ --server-port ${ARCHIVE_NODE_PORT} >${ARCHIVE_LOG_FILE_PATH} 2>&1 & wait-for-service ${ARCHIVE_NODE_PORT} @@ -127,8 +127,8 @@ if [[ $NETWORK_TYPE == "single-node" ]]; then --proof-level ${PROOF_LEVEL} \ --insecure-rest-server \ --log-json \ - --log-level Trace \ - --file-log-level Trace \ + --log-level ${LOG_LEVEL} \ + --file-log-level ${LOG_LEVEL} \ --demo-mode \ --seed ${ARCHIVE_CLI_ARGS} >${DAEMON_LOG_FILE_PATH} 2>&1 elif [[ $NETWORK_TYPE == "multi-node" ]]; then @@ -144,7 +144,7 @@ elif [[ $NETWORK_TYPE == "multi-node" ]]; then ARCHIVE_CLI_ARGS=" --archive --pg-user ${POSTGRES_USER} --pg-passwd ${POSTGRES_PASSWORD} --pg-db ${POSTGRES_DB}" fi - bash ${HOME}/mina-local-network.sh -sp 3100 -w 2 -f 1 -n 1 -u -ll Trace -fll Trace -pl ${PROOF_LEVEL}${ARCHIVE_CLI_ARGS} + bash ${HOME}/mina-local-network.sh -sp 3100 -w 2 -f 1 -n 1 -u -ll ${LOG_LEVEL} -fll ${LOG_LEVEL} -pl ${PROOF_LEVEL}${ARCHIVE_CLI_ARGS} else echo "" echo "Unknown network type: $NETWORK_TYPE"