chore(unitproc):bkFreqWrite:Update debug messages
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Thu, 9 Jul 2020 19:46:20 +0000 (19:46 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Thu, 9 Jul 2020 19:46:20 +0000 (19:46 +0000)
unitproc/bkFreqWrite

index 663c0302e3fa303d44a9f66eb41ef43249d64a5f..9cad3aa52969410bc3208a31a292034f457113e9 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
-# Desc: Writes stdin to disk every 5 minutes
+# Desc: Writes stdin to disk every 5 seconds
 
-yell() { echo "[$(date --iso-8601=ns)]:$0: $*" >&2; }      #o Yell, Die, Try Three-Fingered Claw technique
+yell() { echo "$0: $*" >&2; }      #o Yell, Die, Try Three-Fingered Claw technique
 die() { yell "$*"; exit 111; }     #o Ref/Attrib: https://stackoverflow.com/a/25515370
 try() { "$@" || die "cannot $*"; } #o
 
@@ -24,9 +24,9 @@ while [[ $SECONDS -lt "scriptTTL" ]]; do
     while read -r line && [[ $SECONDS -lt "$bufferTOD" ]]; do
        # Append line to buffer
        buffer+=("$line");
-       echo "Processing line:$lineCount";
-       echo "Current line   :$line";
-       echo "buf elem count :${#buffer[@]}";
+       echo "DEBUG:Processing line:$lineCount";
+       echo "DEBUG:Current line   :$line";
+       echo "DEBUG:buf elem count :${#buffer[@]}";
        ((lineCount++));
     done;
     # Export buffer to asynchronous processing.