adjust error report to be a single entry

Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
This commit is contained in:
Chanwit Kaewkasi 2015-01-06 09:08:55 +07:00
parent 5f6a257e0c
commit 93026e166a
1 changed files with 1 additions and 2 deletions

View File

@ -50,8 +50,7 @@ func (c *Cluster) AddNode(n *Node) error {
if old, exists := c.nodes[n.ID]; exists {
if old.IP != n.IP {
log.Errorf("ID duplicated: %s", n.ID)
log.Errorf("IP [%s] and [%s] share the same ID", old.IP, n.IP)
log.Errorf("ID duplicated. %s shared by %s and %s", n.ID, old.IP, n.IP)
}
return ErrNodeAlreadyRegistered
}