From 16c526af34f473eefed6475b5ab0f0a565fadd70 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 19 Mar 2019 05:39:30 +0000 Subject: [PATCH 1/2] [misc] reduce number of logs Signed-off-by: Leo Chen --- consensus/consensus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/consensus.go b/consensus/consensus.go index b9bafe7ea..6b4ca41a4 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -630,7 +630,7 @@ func (consensus *Consensus) populateMessageFields(request *msg_pb.ConsensusReque // 4 byte sender id request.SenderId = uint32(consensus.nodeID) - utils.GetLogInstance().Debug("[populateMessageFields]", "myConsensusID", consensus.consensusID, "SenderId", request.SenderId) + // utils.GetLogInstance().Debug("[populateMessageFields]", "myConsensusID", consensus.consensusID, "SenderId", request.SenderId) } // Signs the consensus message and returns the marshaled message. From b814fa056bc51d8992e8227acfe8acd7973f4bd8 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 19 Mar 2019 07:06:15 +0000 Subject: [PATCH 2/2] [build] add -v option in build script -v will output a lot of build process Signed-off-by: Leo Chen --- scripts/go_executable_build.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/go_executable_build.sh b/scripts/go_executable_build.sh index e2fb4fba4..ff4a72e13 100755 --- a/scripts/go_executable_build.sh +++ b/scripts/go_executable_build.sh @@ -13,6 +13,7 @@ GOOS=linux GOARCH=amd64 FOLDER=/${WHOAMI:-$USER} RACE= +VERBOSE= unset -v progdir case "${0}" in @@ -50,6 +51,7 @@ OPTIONS: -b bucket set the upload bucket name (default: $BUCKET) -f folder set the upload folder name in the bucket (default: $FOLDER) -r enable -race build option (default: $RACE) + -v verbose build process (default: $VERBOSE) ACTION: build build binaries only (default action) @@ -87,7 +89,7 @@ function build_only if [[ -z "$build" || "$bin" == "$build" ]]; then rm -f $BINDIR/$bin echo "building ${SRC[$bin]}" - env GOOS=$GOOS GOARCH=$GOARCH go build -v -x -ldflags="-X main.version=v${VERSION} -X main.commit=${COMMIT} -X main.builtAt=${BUILTAT} -X main.builtBy=${BUILTBY}" -o $BINDIR/$bin $RACE ${SRC[$bin]} + env GOOS=$GOOS GOARCH=$GOARCH go build $VERBOSE -ldflags="-X main.version=v${VERSION} -X main.commit=${COMMIT} -X main.builtAt=${BUILTAT} -X main.builtBy=${BUILTBY}" -o $BINDIR/$bin $RACE ${SRC[$bin]} if [ "$(uname -s)" == "Linux" ]; then $BINDIR/$bin -version fi @@ -116,7 +118,7 @@ function upload if [ -e ${LIB[$lib]} ]; then $AWSCLI s3 cp ${LIB[$lib]} s3://${BUCKET}$FOLDER/$lib --acl public-read else - echo "!! MISSING $lib !!" + echo "!! MISSING ${LIB[$lib]} !!" fi done @@ -153,7 +155,7 @@ function upload_wallet if [ -e ${LIB[$lib]} ]; then $AWSCLI s3 cp ${LIB[$lib]} s3://${PUBBUCKET}/$DESTDIR/$lib --acl public-read else - echo "!! MISSING $lib !!" + echo "!! MISSING ${LIB[$lib]} !!" fi done @@ -161,7 +163,7 @@ function upload_wallet } ################################ MAIN FUNCTION ############################## -while getopts "hp:a:o:b:f:r" option; do +while getopts "hp:a:o:b:f:rv" option; do case $option in h) usage ;; p) PROFILE=$OPTARG ;; @@ -170,6 +172,7 @@ while getopts "hp:a:o:b:f:r" option; do b) BUCKET=$OPTARG/ ;; f) FOLDER=$OPTARG ;; r) RACE=-race ;; + v) VERBOSE='-v -x' ;; esac done