mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: Format node IDs as hex in DescribeMessage.
This is how they are printed in all other log messages.
This commit is contained in:
parent
260aad5468
commit
ef721db247
@ -62,7 +62,7 @@ type EntryFormatter func([]byte) string
|
|||||||
// Message for debugging.
|
// Message for debugging.
|
||||||
func DescribeMessage(m pb.Message, f EntryFormatter) string {
|
func DescribeMessage(m pb.Message, f EntryFormatter) string {
|
||||||
var buf bytes.Buffer
|
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 {
|
if m.Reject {
|
||||||
fmt.Fprintf(&buf, " Rejected")
|
fmt.Fprintf(&buf, " Rejected")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user