summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-21 13:12:21 -0500
committerGitHub <noreply@github.com>2020-02-21 13:12:21 -0500
commit5bdf5aeb71981a4951c039b1c795b24ca31ca705 (patch)
tree86c62589838a4fb836b4d27c94fbcc0772361485 /pkg
parenta554e97adcd565bd378a7041589b3b4979489ead (diff)
parente3b31a3ab80c5f681fb157f0e10eb2d3819ef18b (diff)
downloadpodman-5bdf5aeb71981a4951c039b1c795b24ca31ca705.tar.gz
podman-5bdf5aeb71981a4951c039b1c795b24ca31ca705.tar.bz2
podman-5bdf5aeb71981a4951c039b1c795b24ca31ca705.zip
Merge pull request #5263 from baude/logsize
implement reverse reader for log reads
Diffstat (limited to 'pkg')
-rw-r--r--pkg/adapter/containers.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
index 170b2e24e..ab4255f89 100644
--- a/pkg/adapter/containers.go
+++ b/pkg/adapter/containers.go
@@ -338,7 +338,11 @@ func (r *LocalRuntime) Log(c *cliconfig.LogsValues, options *logs.LogOptions) er
if tailLen < 0 {
tailLen = 0
}
- logChannel := make(chan *logs.LogLine, tailLen*len(c.InputArgs)+1)
+ numContainers := len(c.InputArgs)
+ if numContainers == 0 {
+ numContainers = 1
+ }
+ logChannel := make(chan *logs.LogLine, tailLen*numContainers+1)
containers, err := shortcuts.GetContainersByContext(false, c.Latest, c.InputArgs, r.Runtime)
if err != nil {
return err