summaryrefslogtreecommitdiff
path: root/libpod/container_log.go
diff options
context:
space:
mode:
authorcdoern <cdoern@redhat.com>2021-07-06 14:53:56 -0400
committercdoern <cdoern@redhat.com>2021-07-09 12:21:46 -0400
commit4624142c2db039343efc8c9b8070cf1e0d3a7262 (patch)
treeca5af233eb2ed67036eeffa05f939743196fac38 /libpod/container_log.go
parent1a9cb93f16cf19e14581319e2fd1b60e791f74dd (diff)
downloadpodman-4624142c2db039343efc8c9b8070cf1e0d3a7262.tar.gz
podman-4624142c2db039343efc8c9b8070cf1e0d3a7262.tar.bz2
podman-4624142c2db039343efc8c9b8070cf1e0d3a7262.zip
Implemented Until Query Parameter for Containers/logs
compat containers/logs was missing actual usage of until query param. fixes #10859 Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'libpod/container_log.go')
-rw-r--r--libpod/container_log.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_log.go b/libpod/container_log.go
index 43b3f7736..743c9c61b 100644
--- a/libpod/container_log.go
+++ b/libpod/container_log.go
@@ -56,7 +56,7 @@ func (c *Container) readFromLogFile(ctx context.Context, options *logs.LogOption
for _, nll := range tailLog {
nll.CID = c.ID()
nll.CName = c.Name()
- if nll.Since(options.Since) {
+ if nll.Since(options.Since) && nll.Until(options.Until) {
logChannel <- nll
}
}
@@ -88,7 +88,7 @@ func (c *Container) readFromLogFile(ctx context.Context, options *logs.LogOption
}
nll.CID = c.ID()
nll.CName = c.Name()
- if nll.Since(options.Since) {
+ if nll.Since(options.Since) && nll.Until(options.Until) {
logChannel <- nll
}
}