logging: Reset external loggers when cid+sid available

Once `containerID` and `sandboxID` fields are available, re-register
the logger with the external packages to ensure they too display these
important fields.

Fixes #467.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt
2018-07-04 14:49:58 +01:00
parent 03d4d4937c
commit 64e2ca35dd
9 changed files with 19 additions and 0 deletions

View File

@@ -52,6 +52,8 @@ func start(containerID string) (vc.VCSandbox, error) {
"sandbox": sandboxID,
})
setExternalLoggers(kataLog)
containerID = status.ID
containerType, err := oci.GetContainerType(status.Annotations)