From 96e7109d6450c62fd9fb11a588d9668f9d5d2b7a Mon Sep 17 00:00:00 2001
From: Benjamin Wenger <ben@elixxir.ioo>
Date: Mon, 18 Oct 2021 10:22:02 -0700
Subject: [PATCH] improved the logging on send

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

diff --git a/cmd/root.go b/cmd/root.go
index 46c067e31..036ff66cf 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -194,7 +194,7 @@ var rootCmd = &cobra.Command{
 		go func() {
 			//sendDelay := time.Duration(viper.GetUint("sendDelay"))
 			for i := 0; i < sendCnt; i++ {
-				go func() {
+				go func(i int) {
 					defer wg.Done()
 					fmt.Printf("Sending to %s: %s\n", recipientID, msgBody)
 					var roundIDs []id.Round
@@ -225,9 +225,9 @@ var rootCmd = &cobra.Command{
 					}
 
 					if err != nil {
-						jww.FATAL.Panicf("%+v", err)
+						jww.FATAL.Panicf("Message sending for send %d failed: %+v", i, err)
 					}
-				}()
+				}(i)
 			}
 		}()
 
-- 
GitLab