diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-16 11:23:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 11:23:23 +0000 |
commit | f1f7b8f6c80916bc88f5a01137e0d9fd971f8ac1 (patch) | |
tree | 1f6ce5bd3831bf29432305a12f85d6ed6004f630 /libpod/container_inspect.go | |
parent | 8333a9ee90078dd8cf1194f1df59bae70709bdf1 (diff) | |
parent | e42d920ebfa381322eb03cb27941ecb93eea3dd7 (diff) | |
download | podman-f1f7b8f6c80916bc88f5a01137e0d9fd971f8ac1.tar.gz podman-f1f7b8f6c80916bc88f5a01137e0d9fd971f8ac1.tar.bz2 podman-f1f7b8f6c80916bc88f5a01137e0d9fd971f8ac1.zip |
Merge pull request #8730 from rhatdan/log
Add LogSize to container inspect
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r-- | libpod/container_inspect.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index 2ce3e8e68..51474471b 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -8,6 +8,7 @@ import ( "github.com/containers/podman/v2/libpod/define" "github.com/containers/podman/v2/libpod/driver" "github.com/containers/podman/v2/pkg/util" + units "github.com/docker/go-units" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-tools/generate" "github.com/opencontainers/runtime-tools/validate" @@ -124,8 +125,6 @@ func (c *Container) getContainerInspectData(size bool, driverData *driver.Data) HostnamePath: hostnamePath, HostsPath: hostsPath, StaticDir: config.StaticDir, - LogPath: config.LogPath, - LogTag: config.LogTag, OCIRuntime: config.OCIRuntime, ConmonPidFile: config.ConmonPidFile, Name: config.Name, @@ -354,6 +353,10 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named logConfig := new(define.InspectLogConfig) logConfig.Type = c.config.LogDriver + logConfig.Path = c.config.LogPath + logConfig.Size = units.HumanSize(float64(c.config.LogSize)) + logConfig.Tag = c.config.LogTag + hostConfig.LogConfig = logConfig restartPolicy := new(define.InspectRestartPolicy) |