mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: make peer URLs log message more readable
This commit is contained in:
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…
x
Reference in New Issue
Block a user