From 2f879d202da96679f550edcbc83317a31f83f31b Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 30 Oct 2023 19:17:10 +0700 Subject: [PATCH] chore(dashmate): set tenderdash logging level to info (#1540) --- .../dashmate/configs/defaults/getBaseConfigFactory.js | 2 +- .../dashmate/configs/getConfigFileMigrationsFactory.js | 8 ++++++++ .../src/listr/tasks/setup/setupLocalPresetTaskFactory.js | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index ffa10704248..ef545685453 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -199,7 +199,7 @@ function getBaseConfigFactory(homeDir) { createEmptyBlocksInterval: '3m', }, log: { - level: 'debug', + level: 'info', format: 'plain', path: null, }, diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index faa940576d0..319328f45ed 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -268,6 +268,14 @@ function getConfigFileMigrationsFactory(homeDir, defaultConfigs) { fs.rmSync(homeDir.joinPath('ssl'), { recursive: true }); } + return configFile; + }, + '1.0.0-dev.1': (configFile) => { + Object.entries(configFile.configs) + .forEach(([, options]) => { + options.platform.tenderdash.log.level = 'info'; + }); + return configFile; }, }; diff --git a/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js index 71bf7df587d..fb6546870b7 100644 --- a/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js @@ -85,7 +85,7 @@ function setupLocalPresetTaskFactory( ctx.minerInterval = await task.prompt({ type: 'input', message: 'Enter the interval between core blocks', - initial: configFile.getConfig('base').options.core.miner.interval, + initial: configFile.getConfig('base').get('core.miner.interval'), validate: (state) => { if (state.match(/\d+(\.\d+)?(m|s)/)) { return true; @@ -239,6 +239,7 @@ function setupLocalPresetTaskFactory( config.set('platform.drive.abci.logs.stdout.format', 'full'); } + // TODO: Shall we use trace? config.set('platform.drive.tenderdash.log.level', 'debug'); }