Skip to content

Commit

Permalink
logging: Add cid logging to update command
Browse files Browse the repository at this point in the history
PR kata-containers#468 neglected to update the `update` command.

Fixes kata-containers#519.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
  • Loading branch information
jodh-intel committed Jul 27, 2018
1 parent 95dd5da commit 48955b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ other options are ignored.
}

containerID := context.Args().First()

kataLog = kataLog.WithField("container", containerID)
setExternalLoggers(kataLog)

status, sandboxID, err := getExistingContainerInfo(containerID)
if err != nil {
return err
Expand All @@ -144,6 +148,8 @@ other options are ignored.
"sandbox": sandboxID,
})

setExternalLoggers(kataLog)

// container MUST be running
if status.State.State != vc.StateRunning {
return fmt.Errorf("Container %s is not running", containerID)
Expand Down

0 comments on commit 48955b0

Please sign in to comment.