summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-01-30 06:23:58 +0100
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-03 19:49:14 +0000
commit095aaaa639ab57c594bb80bfefbfaed2a2fdff92 (patch)
tree55db4600d1fe284fb591ee810d490b179afe16ad /libpod/runtime_ctr.go
parent6ba6ecf59b9204d36388de07b866f157a4d13957 (diff)
downloadpodman-095aaaa639ab57c594bb80bfefbfaed2a2fdff92.tar.gz
podman-095aaaa639ab57c594bb80bfefbfaed2a2fdff92.tar.bz2
podman-095aaaa639ab57c594bb80bfefbfaed2a2fdff92.zip
Allow users to specify logpath
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #135 Approved by: mheon
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 42f3dd892..6d55a9438 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -62,6 +62,9 @@ func (r *Runtime) NewContainer(rSpec *spec.Spec, options ...CtrCreateOption) (c
}
}()
+ if ctr.config.LogPath == "" {
+ ctr.config.LogPath = filepath.Join(ctr.config.StaticDir, "ctr.log")
+ }
if ctr.config.ShmDir == "" {
ctr.config.ShmDir = filepath.Join(ctr.bundlePath(), "shm")
if err := os.MkdirAll(ctr.config.ShmDir, 0700); err != nil {
@@ -71,7 +74,6 @@ func (r *Runtime) NewContainer(rSpec *spec.Spec, options ...CtrCreateOption) (c
}
ctr.config.Mounts = append(ctr.config.Mounts, ctr.config.ShmDir)
}
-
// Add the container to the state
// TODO: May be worth looking into recovering from name/ID collisions here
if ctr.config.Pod != "" {
@@ -89,7 +91,6 @@ func (r *Runtime) NewContainer(rSpec *spec.Spec, options ...CtrCreateOption) (c
return nil, err
}
}
-
return ctr, nil
}