summaryrefslogtreecommitdiff
path: root/libpod/container_api.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_api.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_api.go')
-rw-r--r--libpod/container_api.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 2d5b07a35..50be0eea4 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -229,6 +229,10 @@ func (c *Container) Kill(signal uint) error {
// This function returns when the attach finishes. It does not hold the lock for
// the duration of its runtime, only using it at the beginning to verify state.
func (c *Container) Attach(streams *define.AttachStreams, keys string, resize <-chan define.TerminalSize) error {
+ switch c.LogDriver() {
+ case define.PassthroughLogging:
+ return errors.Wrapf(define.ErrNoLogs, "this container is using the 'passthrough' log driver, cannot attach")
+ }
if !c.batched {
c.lock.Lock()
if err := c.syncContainer(); err != nil {