etcdserver: make peer URLs log message more readable
parent
f7631be453
commit
9546df9a6c
|
@ -193,7 +193,7 @@ func (h *adminMembersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
|
|||
writeError(w, err)
|
||||
return
|
||||
}
|
||||
log.Printf("etcdhttp: added node %x with peer urls %v", m.ID, req.PeerURLs)
|
||||
log.Printf("etcdhttp: added node %x with peer urls %s", m.ID, req.PeerURLs)
|
||||
|
||||
res := newMember(m)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
|
|
@ -27,6 +27,10 @@ import (
|
|||
|
||||
type URLs []url.URL
|
||||
|
||||
func (us URLs) String() string {
|
||||
return strings.Join(us.StringSlice(), ",")
|
||||
}
|
||||
|
||||
func (us *URLs) Sort() {
|
||||
sort.Sort(us)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue