From 5f96b06add6814d431510c34dd72be7032af7482 Mon Sep 17 00:00:00 2001
From: atvanguard <93arpit@gmail.com>
Date: Fri, 6 Mar 2020 16:00:04 +0530
Subject: [PATCH] Send key while logging error msg

---
 consensus/bor/rest.go | 2 +-
 log/logger.go         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/consensus/bor/rest.go b/consensus/bor/rest.go
index 37a7b12e2..a31295913 100644
--- a/consensus/bor/rest.go
+++ b/consensus/bor/rest.go
@@ -65,7 +65,7 @@ func FetchFromHeimdallWithRetry(client http.Client, urlString string, paths ...s
 		if err == nil && res != nil {
 			return res, nil
 		}
-		log.Info("Retrying again in 5 seconds for next Heimdall span", u.Path)
+		log.Info("Retrying again in 5 seconds for next Heimdall span", "path", u.Path)
 		time.Sleep(5 * time.Second)
 	}
 }
diff --git a/log/logger.go b/log/logger.go
index 874dc2f56..ca3e0b059 100644
--- a/log/logger.go
+++ b/log/logger.go
@@ -207,7 +207,7 @@ func normalize(ctx []interface{}) []interface{} {
 	// that things are the right length and users can fix bugs
 	// when they see the output looks wrong
 	if len(ctx)%2 != 0 {
-		ctx = append(ctx, nil)
+		ctx = append(ctx, nil, errorKey, "Normalized odd number of arguments by adding nil")
 	}
 
 	return ctx
-- 
GitLab