Преглед на файлове

raft: Format node IDs as hex in DescribeMessage.

This is how they are printed in all other log messages.
Ben Darnell преди 11 години
родител
ревизия
ef721db247
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      raft/util.go

+ 1 - 1
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")
 	}