From 3fb4985ea49dd77816e95a16a010a0cd622f8e5c Mon Sep 17 00:00:00 2001 From: D025 Date: Wed, 20 Mar 2024 14:55:06 +0200 Subject: [PATCH] feat: add parameter for set log verbosity and json format (#10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ Logs in json format and option for set verbosity level for rust ## Why ❔ It can be useful for specify verbose level. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Documentation comments have been added / updated. --- defaults/main.yml | 1 + templates/docker-compose.yaml.j2 | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index acae1df..2cf0f5a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -80,6 +80,7 @@ rpc_http_port: 3060 rpc_ws_port: 3061 healthcheck_port: 3081 metrics_port: 3082 +log_verbosity: info # Monitoring options section enable_monitoring: false diff --git a/templates/docker-compose.yaml.j2 b/templates/docker-compose.yaml.j2 index 0b7e276..dfe6065 100644 --- a/templates/docker-compose.yaml.j2 +++ b/templates/docker-compose.yaml.j2 @@ -90,7 +90,8 @@ services: CHAIN_STATE_KEEPER_VALIDATION_COMPUTATIONAL_GAS_LIMIT: 2000000 DATABASE_POOL_SIZE: 200 EN_MAX_BLOCKS_PER_TREE_BATCH: 200 - RUST_LOG: zksync_core=debug,zksync_dal=info,zksync_eth_client=info,zksync_merkle_tree=info,zksync_storage=info,zksync_state=debug,zksync_types=info,vm=info,zksync_external_node=info,zksync_utils=debug + MISC_LOG_FORMAT: json + RUST_LOG: zksync_external_node={{ log_verbosity }} healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:{{ healthcheck_port }}/health" ] interval: 1m