Merge branch 'runtimeloglevel' into devel

This commit is contained in:
Ștefan Talpalaru 2020-02-09 03:38:14 +01:00
commit d78a7f4a6a
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
2 changed files with 8 additions and 2 deletions

View File

@ -114,10 +114,10 @@ clean-testnet1:
rm -rf build/data/testnet1 rm -rf build/data/testnet1
testnet0: | build deps testnet0: | build deps
NIM_PARAMS="$(NIM_PARAMS)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims testnet0 NIM_PARAMS="$(NIM_PARAMS)" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims testnet0
testnet1: | build deps testnet1: | build deps
NIM_PARAMS="$(NIM_PARAMS)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims testnet1 NIM_PARAMS="$(NIM_PARAMS)" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims testnet1
clean: | clean-common clean: | clean-common
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_testnet*,state_sim,transition*} rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_testnet*,state_sim,transition*}

View File

@ -131,11 +131,17 @@ cli do (testnetName {.argument.}: string):
echo "\nDeposit sent, wait for confirmation then press enter to continue" echo "\nDeposit sent, wait for confirmation then press enter to continue"
discard readLineFromStdin() discard readLineFromStdin()
let logLevel = getEnv("LOG_LEVEL")
var logLevelOpt = ""
if logLevel.len > 0:
logLevelOpt = "--log-level=" & logLevel
mode = Verbose mode = Verbose
execIgnoringExitCode replace(&"""{beaconNodeBinary} execIgnoringExitCode replace(&"""{beaconNodeBinary}
--data-dir="{dataDir}" --data-dir="{dataDir}"
--dump=true --dump=true
--web3-url={web3Url} --web3-url={web3Url}
{bootstrapFileOpt} {bootstrapFileOpt}
{logLevelOpt}
--state-snapshot="{testnetDir/genesisFile}" """ & depositContractOpt, "\n", " ") --state-snapshot="{testnetDir/genesisFile}" """ & depositContractOpt, "\n", " ")