aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_log.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-29 15:33:06 -0400
committerGitHub <noreply@github.com>2021-09-29 15:33:06 -0400
commitb187dfef20df5cd853b46fe7f56d7cfae4ea0bf5 (patch)
tree59fe23fba1b5cba9e51e7c4f6b80e03fec2d1308 /libpod/container_log.go
parentd987f26f1e2449d3237faa0b873d82ce5a89e0ee (diff)
parent3ce98a5ec28840f2d7836a002a156974f37f6c0e (diff)
downloadpodman-b187dfef20df5cd853b46fe7f56d7cfae4ea0bf5.tar.gz
podman-b187dfef20df5cd853b46fe7f56d7cfae4ea0bf5.tar.bz2
podman-b187dfef20df5cd853b46fe7f56d7cfae4ea0bf5.zip
Merge pull request #11390 from giuseppe/logging-passthrough
logging: new mode -l passthrough
Diffstat (limited to 'libpod/container_log.go')
-rw-r--r--libpod/container_log.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/container_log.go b/libpod/container_log.go
index a65b2a44f..18840bff2 100644
--- a/libpod/container_log.go
+++ b/libpod/container_log.go
@@ -18,7 +18,7 @@ import (
var logDrivers []string
func init() {
- logDrivers = append(logDrivers, define.KubernetesLogging, define.NoLogging)
+ logDrivers = append(logDrivers, define.KubernetesLogging, define.NoLogging, define.PassthroughLogging)
}
// Log is a runtime function that can read one or more container logs.
@@ -34,6 +34,8 @@ func (r *Runtime) Log(ctx context.Context, containers []*Container, options *log
// ReadLog reads a containers log based on the input options and returns log lines over a channel.
func (c *Container) ReadLog(ctx context.Context, options *logs.LogOptions, logChannel chan *logs.LogLine) error {
switch c.LogDriver() {
+ case define.PassthroughLogging:
+ return errors.Wrapf(define.ErrNoLogs, "this container is using the 'passthrough' log driver, cannot read logs")
case define.NoLogging:
return errors.Wrapf(define.ErrNoLogs, "this container is using the 'none' log driver, cannot read logs")
case define.JournaldLogging: