Skip to content

Commit

Permalink
fix up error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
chelseakomlo committed Mar 6, 2018
1 parent cb27331 commit b012473
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nomad/node_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions nomad/state/events_state_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b012473

Please sign in to comment.