diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-03-01 19:26:24 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-03-01 19:26:24 +0200 |
commit | f8d2236e55e5c369b218017d1de1058d6a8ee361 (patch) | |
tree | 1cdd4ea1476c3062d3dd38ee1ba62d6bb98eb680 /bin/ak-find-latest-mined-sblock | |
parent | 7affa2082f61455a413d0c8fea08e79935d4f308 (diff) | |
download | arching-kaos-tools-f8d2236e55e5c369b218017d1de1058d6a8ee361.tar.gz arching-kaos-tools-f8d2236e55e5c369b218017d1de1058d6a8ee361.tar.bz2 arching-kaos-tools-f8d2236e55e5c369b218017d1de1058d6a8ee361.zip |
Log formatting adjustment
Diffstat (limited to 'bin/ak-find-latest-mined-sblock')
-rwxr-xr-x | bin/ak-find-latest-mined-sblock | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/ak-find-latest-mined-sblock b/bin/ak-find-latest-mined-sblock index b98214c..c3d9e33 100755 --- a/bin/ak-find-latest-mined-sblock +++ b/bin/ak-find-latest-mined-sblock @@ -4,18 +4,18 @@ cd $MINED_BLOCKS_DIR PROGRAM="$(basename $0)" declare -A counters logitnowint(){ - ak-logthis "<$PROGRAM>" "$1" "$2" + ak-logthis "$PROGRAM" "$1" "$2" } further(){ - # logitnowint "[INFO]" "Diving into $1" + # logitnowint "INFO" "Diving into $1" lookfor $1 } lookfor(){ - echo -n $1 | grep -e '[0-9a-f]\{128\}' > /dev/null + echo -n $1 | grep -e '[0-9a-f]\{128\}' > /dev/null if [ ! $? = 0 ] then - logitnowint "[ERROR]" "Oops!!! The argument passed, does not match the regular expression!" + logitnowint "ERROR" "Oops!!! The argument passed, does not match the regular expression!" else counters[$CHAIN_PARENT]="$(expr ${counters[$CHAIN_PARENT]} + 1)" if [ ! $? = 0 ] @@ -23,22 +23,22 @@ lookfor(){ echo "$1, $counters[$1]" exit 1 fi - logitnowint "[INFO]" "Accessing file: $1" + logitnowint "INFO" "Accessing file: $1" # echo "$1 file:" # cat "$1" | jq NEXT_TARGET="$(cat "$1" | jq | grep previous | tr -d ' ' | sed -e 's/previous//g; s/[",:]//g;')" if [ ! "$NEXT_TARGET" = "" ] then - logitnowint "[INFO]" "Found previous: $NEXT_TARGET" + logitnowint "INFO" "Found previous: $NEXT_TARGET" if [ ! -f "$NEXT_TARGET" ] then - logitnowint "[WARNING]" "Could not find $NEXT_TARGET" + logitnowint "WARNING" "Could not find $NEXT_TARGET" else further "$NEXT_TARGET" fi else - logitnowint "[WARNING]" "No next target found. So long for $1" + logitnowint "WARNING" "No next target found. So long for $1" fi fi } @@ -50,12 +50,12 @@ do # if [ ! "$p" = "" ] && [ ! "$p" = "tmplistblock" ] if [ "$(echo $p | tr -d '\n' | wc -c)" = 128 ] then - logitnowint "[INFO]" "Investigating $p..." + logitnowint "INFO" "Investigating $p..." export CHAIN_PARENT="$p" counters[$CHAIN_PARENT]=1 lookfor "$p" else - logitnowint "[WARNING]" "Nothing to do with $p" + logitnowint "WARNING" "Nothing to do with $p" fi done < tmplistblock rm tmplistblock @@ -68,7 +68,7 @@ do then max="${counters[${value}]}" max_holder="${value}" - logitnowint "[INFO]" "New MAX $max on $max_holder" + logitnowint "INFO" "New MAX $max on $max_holder" fi |