Skip to content

Commit

Permalink
[node.sh] add -L to set logging verbosity level
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Chen <leo@harmony.one>
  • Loading branch information
Leo Chen committed May 13, 2020
1 parent 75d5319 commit f5089b5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/node.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

version="v1 20200507.0"
version="v1 20200513.0"

unset -v progname
progname="${0##*/}"
Expand Down Expand Up @@ -188,6 +188,7 @@ options:
-r address start a pprof profiling server listening on the specified address
-I use statically linked Harmony binary (default: true)
-R tracefile enable p2p trace using tracefile (default: off)
-L log_level logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: $log_level)
examples:
Expand Down Expand Up @@ -239,7 +240,7 @@ BUCKET=pub.harmony.one
OS=$(uname -s)

unset start_clean loop run_as_root blspass do_not_download download_only network node_type shard_id download_harmony_db db_file_to_dl
unset upgrade_rel public_rpc staking_mode pub_port multi_key blsfolder blacklist verify TRACEFILE minpeers max_bls_keys_per_node
unset upgrade_rel public_rpc staking_mode pub_port multi_key blsfolder blacklist verify TRACEFILE minpeers max_bls_keys_per_node log_level
start_clean=false
loop=true
run_as_root=true
Expand All @@ -260,12 +261,13 @@ static=true
verify=false
minpeers=6
max_bls_keys_per_node=10
log_level=3
${BLSKEYFILE=}
${TRACEFILE=}

unset OPTIND OPTARG opt
OPTIND=1
while getopts :1chk:sSp:dDN:T:i:ba:U:PvVyzn:MAIB:r:Y:f:R:m: opt
while getopts :1chk:sSp:dDN:T:i:ba:U:PvVyzn:MAIB:r:Y:f:R:m:L: opt
do
case "${opt}" in
'?') usage "unrecognized option -${OPTARG}";;
Expand Down Expand Up @@ -302,6 +304,7 @@ do
y) staking_mode=false;;
A) archival=true;;
R) TRACEFILE="${OPTARG}";;
L) log_level="${OPTARG}";;
*) err 70 "unhandled option -${OPTARG}";; # EX_SOFTWARE
esac
done
Expand Down Expand Up @@ -911,6 +914,7 @@ do
-blacklist="${blacklist}"
-min_peers="${minpeers}"
-max_bls_keys_per_node="${max_bls_keys_per_node}"
-verbosity="${log_level}"
)
args+=(
-is_archival="${archival}"
Expand Down

0 comments on commit f5089b5

Please sign in to comment.