From ef721db247d614a486eb74caa7d55cb83b9b17a8 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Wed, 20 May 2015 15:32:56 -0400 Subject: [PATCH] raft: Format node IDs as hex in DescribeMessage. This is how they are printed in all other log messages. --- raft/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft/util.go b/raft/util.go index 21e986edc..738eebc0f 100644 --- a/raft/util.go +++ b/raft/util.go @@ -62,7 +62,7 @@ type EntryFormatter func([]byte) string // Message for debugging. func DescribeMessage(m pb.Message, f EntryFormatter) string { var buf bytes.Buffer - fmt.Fprintf(&buf, "%d->%d %s Term:%d Log:%d/%d", m.From, m.To, m.Type, m.Term, m.LogTerm, m.Index) + fmt.Fprintf(&buf, "%x->%x %s Term:%d Log:%d/%d", m.From, m.To, m.Type, m.Term, m.LogTerm, m.Index) if m.Reject { fmt.Fprintf(&buf, " Rejected") }