Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
create: Remove redundant logging code
Browse files Browse the repository at this point in the history
Don't add the container ID as a log fields as it is already a field
(added on #453).

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel authored and Eric Ernst committed Aug 23, 2018
1 parent c4658c3 commit fdf1312
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cli/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

vc "github.com/kata-containers/runtime/virtcontainers"
"github.com/kata-containers/runtime/virtcontainers/pkg/oci"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

Expand Down Expand Up @@ -283,11 +282,7 @@ func createContainer(ociSpec oci.CompatOCISpec, containerID, bundlePath,

func createCgroupsFiles(containerID string, cgroupsDirPath string, cgroupsPathList []string, pid int) error {
if len(cgroupsPathList) == 0 {
fields := logrus.Fields{
"container": containerID,
"pid": pid,
}
kataLog.WithFields(fields).Info("Cgroups files not created because cgroupsPath was empty")
kataLog.WithField("pid", pid).Info("Cgroups files not created because cgroupsPath was empty")
return nil
}

Expand Down

0 comments on commit fdf1312

Please sign in to comment.