From 9b8b7dbfd77f60402eed36e77a287b272eb44eea Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 31 Jul 2019 10:13:30 -0700 Subject: [PATCH] Avoid setting RUST_LOG to the empty string (#5338) --- net/remote/remote-client.sh | 5 +++-- net/remote/remote-deploy-update.sh | 5 +++-- net/remote/remote-node.sh | 5 +++-- net/remote/remote-sanity.sh | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/net/remote/remote-client.sh b/net/remote/remote-client.sh index a3d5c3f457..5c3080ed18 100755 --- a/net/remote/remote-client.sh +++ b/net/remote/remote-client.sh @@ -8,11 +8,12 @@ echo "$(date) | $0 $*" > client.log deployMethod="$1" entrypointIp="$2" clientToRun="$3" -RUST_LOG="$4" +if [[ -n $4 ]]; then + export RUST_LOG="$4" +fi benchTpsExtraArgs="$5" benchExchangeExtraArgs="$6" clientIndex="$7" -export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info missing() { echo "Error: $1 not specified" diff --git a/net/remote/remote-deploy-update.sh b/net/remote/remote-deploy-update.sh index 21d39a7c3d..82d3e8a42b 100755 --- a/net/remote/remote-deploy-update.sh +++ b/net/remote/remote-deploy-update.sh @@ -25,8 +25,9 @@ missing() { [[ -n $updatePlatform ]] || missing updatePlatform [[ -f update_manifest_keypair.json ]] || missing update_manifest_keypair.json -RUST_LOG="$2" -export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info +if [[ -n $2 ]]; then + export RUST_LOG="$2" +fi source net/common.sh loadConfigFile diff --git a/net/remote/remote-node.sh b/net/remote/remote-node.sh index 3f0df7912b..f92c06c26b 100755 --- a/net/remote/remote-node.sh +++ b/net/remote/remote-node.sh @@ -8,7 +8,9 @@ deployMethod="$1" nodeType="$2" entrypointIp="$3" numNodes="$4" -RUST_LOG="$5" +if [[ -n $5 ]]; then + export RUST_LOG="$5" +fi skipSetup="$6" failOnValidatorBootupFailure="$7" externalPrimordialAccountsFile="$8" @@ -23,7 +25,6 @@ benchExchangeExtraArgs="${16}" genesisOptions="${17}" extraNodeArgs="${18}" set +x -export RUST_LOG # Use a very large stake (relative to the default multinode-demo/ stake of 42) # for the testnet validators setup by net/. This make it less likely that diff --git a/net/remote/remote-sanity.sh b/net/remote/remote-sanity.sh index 6d62fc8cd6..f4be17ddc3 100755 --- a/net/remote/remote-sanity.sh +++ b/net/remote/remote-sanity.sh @@ -60,8 +60,9 @@ while [[ $1 = -o ]]; do esac done -RUST_LOG="$1" -export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info +if [[ -n $1 ]]; then + export RUST_LOG="$1" +fi source net/common.sh loadConfigFile