mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
fix up error logging
This commit is contained in:
committed by
Alex Dadgar
parent
f051d43a5f
commit
55e0c7d06d
@@ -61,7 +61,7 @@ func (n *Node) EmitEvent(args *structs.EmitNodeEventRequest, reply *structs.Emit
|
||||
_, index, err := n.srv.raftApply(structs.AddNodeEventType, args)
|
||||
|
||||
if err != nil {
|
||||
n.srv.logger.Printf("[ERR] nomad.node AddNodeEventType failed: %+v", err)
|
||||
n.srv.logger.Printf("[ERR] nomad.node AddNodeEventType failed: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ func (s *StateStore) upsertNodeEvent(index uint64, nodeID string, event *structs
|
||||
node, err := s.NodeByID(ws, nodeID)
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to look up nodes by id %+v", err)
|
||||
return fmt.Errorf("encountered error when looking up nodes by id to insert node event: %v", err)
|
||||
}
|
||||
|
||||
if node == nil {
|
||||
return fmt.Errorf("unable to look up nodes by id %s", nodeID)
|
||||
return fmt.Errorf("unable to look up node by id %s to insert node event", nodeID)
|
||||
}
|
||||
|
||||
event.CreateIndex = index
|
||||
|
||||
Reference in New Issue
Block a user