make testnetX: propagate LOG_LEVEL to beacon_node runtime [skip ci]
This allows running `make LOG_LEVEL=TRACE testnet1` and having that log level also enabled at runtime, not just at compile time.
This commit is contained in:
parent
521b0ed6ba
commit
7feaa11372
4
Makefile
4
Makefile
|
@ -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*}
|
||||||
|
|
|
@ -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", " ")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue