summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-15 15:25:46 +0200
committerGitHub <noreply@github.com>2021-10-15 15:25:46 +0200
commit307b1b43b2dc7933e0e60a054026dd6d01148afd (patch)
tree5b9c4cd75774446ae86262d80f3109aa7254a31a /libpod
parentfecef1533253ffad101619be2b4686ec8cd131de (diff)
parentf9ff0525c5fea21bdf8ed398547f861211249a83 (diff)
downloadpodman-307b1b43b2dc7933e0e60a054026dd6d01148afd.tar.gz
podman-307b1b43b2dc7933e0e60a054026dd6d01148afd.tar.bz2
podman-307b1b43b2dc7933e0e60a054026dd6d01148afd.zip
Merge pull request #11977 from rhatdan/log
Don't include ctr.log if not using file logging
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal_linux.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index f652a3ebb..d8385961f 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -1008,12 +1008,15 @@ func (c *Container) exportCheckpoint(options ContainerCheckpointOptions) error {
includeFiles := []string{
"artifacts",
- "ctr.log",
metadata.ConfigDumpFile,
metadata.SpecDumpFile,
metadata.NetworkStatusFile,
}
+ if c.LogDriver() == define.KubernetesLogging ||
+ c.LogDriver() == define.JSONLogging {
+ includeFiles = append(includeFiles, "ctr.log")
+ }
if options.PreCheckPoint {
includeFiles = append(includeFiles, preCheckpointDir)
} else {