From 3323c087c583e62663aac985b7a44a80d0d25f1f Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 27 Jul 2018 14:46:43 +0100 Subject: [PATCH] logging: Add cid logging to update command PR #468 neglected to update the `update` command. Fixes #519. Signed-off-by: James O. D. Hunt --- cli/update.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/update.go b/cli/update.go index fbb718f62..71b2dfbdd 100644 --- a/cli/update.go +++ b/cli/update.go @@ -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 @@ -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)