From 33579b973869aa581c63f21d416d54bca8415286 Mon Sep 17 00:00:00 2001
From: Benjamin Wenger <ben@elixxir.ioo>
Date: Fri, 15 Oct 2021 11:35:00 -0700
Subject: [PATCH] improved CMD jww logging

---
 cmd/root.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cmd/root.go b/cmd/root.go
index a88efa9fe..6e32bf82e 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -236,14 +236,15 @@ var rootCmd = &cobra.Command{
 		expectedCnt := viper.GetUint("receiveCount")
 		receiveCnt := uint(0)
 		waitSecs := viper.GetUint("waitTimeout")
-		waitTimeout := time.Duration(waitSecs)
+		waitTimeout := time.Duration(waitSecs)* time.Second
 		done := false
 
 		for !done && expectedCnt != 0 {
-			timeoutTimer := time.NewTimer(waitTimeout * time.Second)
+			timeoutTimer := time.NewTimer(waitTimeout)
 			select {
 			case <-timeoutTimer.C:
 				fmt.Println("Timed out!")
+				jww.ERROR.Printf("Timed out on message reception after %s!", waitTimeout)
 				done = true
 				break
 			case m := <-recvCh:
@@ -257,6 +258,7 @@ var rootCmd = &cobra.Command{
 				break
 			}
 		}
+		jww.INFO.Printf("Received %d/%d Messages %s!", receiveCnt, expectedCnt)
 		fmt.Printf("Received %d\n", receiveCnt)
 		if roundsNotepad != nil {
 			roundsNotepad.INFO.Printf("\n%s", client.GetNetworkInterface().GetVerboseRounds())
-- 
GitLab