Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sargun committed May 10, 2018
1 parent e63b5a1 commit d6b05ac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions executor/runtime/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1241,8 +1241,8 @@ func (r *DockerRuntime) statusMonitor(cancel context.CancelFunc, c *runtimeTypes
log.Fatal("Got error while listening for events, bailing: ", err)
case event := <-eventChan:
log.Info("Got event: ", event)
shouldExit := handleEvent(c, event, statusMessageChan)
if shouldExit {
if handleEvent(c, event, statusMessageChan) {
log.Info("Terminating docker status monitor")
return
}
}
Expand All @@ -1267,7 +1267,7 @@ func handleEvent(c *runtimeTypes.Container, message events.Message, statusMessag
"actorId": message.Actor.ID,
})
for k, v := range message.Actor.Attributes {
l = l.WithField(k, v)
l = l.WithField(fmt.Sprintf("actor.attributes.%s", k), v)
}
l.Info("Processing message")
switch message.Action {
Expand Down Expand Up @@ -1306,6 +1306,8 @@ func handleEvent(c *runtimeTypes.Container, message events.Message, statusMessag
log.WithField("taskID", c.ID).Info("Received unexpected event: ", message)
return false
}

log.Info("Finishing monitoring loop")
return true
}

Expand Down

0 comments on commit d6b05ac

Please sign in to comment.