Merge pull request #1195 from status-im/nbclog

connect_to_testnet.nims changes [skip ci]
This commit is contained in:
Ștefan Talpalaru 2020-06-17 23:42:10 +02:00 committed by GitHub
commit a9c7e19450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 7 deletions

View File

@ -30,10 +30,6 @@ cli do (skipGoerliKey {.
desc: "The Ethereum 2.0 const preset of the network (optional)" desc: "The Ethereum 2.0 const preset of the network (optional)"
name: "const-preset" .} = "", name: "const-preset" .} = "",
devBuild {.
desc: "Enables more extensive logging and debugging support"
name: "dev-build" .} = false,
nodeID {. nodeID {.
desc: "Node ID" .} = 0.int, desc: "Node ID" .} = 0.int,
@ -44,7 +40,7 @@ cli do (skipGoerliKey {.
desc: "Base metrics port (nodeID will be added to it)" .} = 8008.int, desc: "Base metrics port (nodeID will be added to it)" .} = 8008.int,
baseRpcPort {. baseRpcPort {.
desc: "Base rpc port (nodeID will be added to it)" .} = 9090.int, desc: "Base rpc port (nodeID will be added to it)" .} = 9190.int,
testnetName {.argument .}: string): testnetName {.argument .}: string):
let let
@ -104,8 +100,8 @@ cli do (skipGoerliKey {.
var var
nimFlags = "-d:chronicles_log_level=TRACE " & getEnv("NIM_PARAMS") nimFlags = "-d:chronicles_log_level=TRACE " & getEnv("NIM_PARAMS")
if devBuild: # write the logs to a file
nimFlags.add """ -d:"chronicles_sinks=textlines,json[file(nbc.log)]" """ nimFlags.add """ -d:"chronicles_sinks=textlines,json[file(nbc""" & staticExec("date +\"%Y%m%d%H%M%S\"") & """.log)]" """
let depositContractFile = testnetDir / depositContractFileName let depositContractFile = testnetDir / depositContractFileName
if system.fileExists(depositContractFile): if system.fileExists(depositContractFile):
@ -167,6 +163,7 @@ cli do (skipGoerliKey {.
logLevelOpt = &"""--log-level="{logLevel}" """ logLevelOpt = &"""--log-level="{logLevel}" """
mode = Verbose mode = Verbose
cd dataDir
execIgnoringExitCode replace(&"""{beaconNodeBinary} execIgnoringExitCode replace(&"""{beaconNodeBinary}
--data-dir="{dataDir}" --data-dir="{dataDir}"
--dump --dump