diff options
author | Jhon Honce <jhonce@redhat.com> | 2018-02-21 16:54:24 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-22 12:39:08 +0000 |
commit | b8d1ce03a142d386e88ed505c1895d50b47448a5 (patch) | |
tree | df50d0e91ead7a280eba2ccd3d2b87bb3702a94a /cmd | |
parent | a58e9f7cee4c0b6060b91246ea4a007eebb30d7f (diff) | |
download | podman-b8d1ce03a142d386e88ed505c1895d50b47448a5.tar.gz podman-b8d1ce03a142d386e88ed505c1895d50b47448a5.tar.bz2 podman-b8d1ce03a142d386e88ed505c1895d50b47448a5.zip |
Add tests and cleanup
- Added run_cgroup_parent_test.go
- Cleaned up calls to logrus
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes: #370
Approved by: rhatdan
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/run.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go index 32b3b9bdc..f13e293bc 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -84,10 +84,12 @@ func runCmd(c *cli.Context) error { return err } - logrus.Debug("new container created ", ctr.ID()) + if logrus.GetLevel() == logrus.DebugLevel { + logrus.Debugf("New container created %q", ctr.ID()) - p, _ := ctr.CGroupPath()("") - logrus.Debugf("createConfig.CgroupParent %v for %v", p, ctr.ID()) + p, _ := ctr.CGroupPath()("") + logrus.Debugf("container %q has CgroupParent %q", ctr.ID(), p) + } if err := ctr.Init(); err != nil { // This means the command did not exist @@ -107,8 +109,6 @@ func runCmd(c *cli.Context) error { return err } - logrus.Debug("new container created ", ctr.ID()) - if c.String("cidfile") != "" { if err := libpod.WriteFile(ctr.ID(), c.String("cidfile")); err != nil { logrus.Error(err) |