summaryrefslogtreecommitdiff
path: root/libpod/container_api.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-13 12:30:14 -0700
committerGitHub <noreply@github.com>2020-05-13 12:30:14 -0700
commit71f66f03c5dcf8ab65c741e64c60ce12b01218a8 (patch)
tree3000cb5cb03f019dd8b18386330552ca109e2612 /libpod/container_api.go
parent886b2cc4b10c32611b45da983fa9d1318d38356a (diff)
parentb6113e2b9ea8f397e345a09335c26f953994c6f4 (diff)
downloadpodman-71f66f03c5dcf8ab65c741e64c60ce12b01218a8.tar.gz
podman-71f66f03c5dcf8ab65c741e64c60ce12b01218a8.tar.bz2
podman-71f66f03c5dcf8ab65c741e64c60ce12b01218a8.zip
Merge pull request #6203 from jwhonce/wip/attach
V2 attach bindings and test
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r--libpod/container_api.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index b31079b26..d366ffb84 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -285,6 +285,7 @@ func (c *Container) HTTPAttach(httpCon net.Conn, httpBuf *bufio.ReadWriter, stre
logrus.Infof("Performing HTTP Hijack attach to container %s", c.ID())
+ logSize := 0
if streamLogs {
// Get all logs for the container
logChan := make(chan *logs.LogLine)
@@ -302,7 +303,7 @@ func (c *Container) HTTPAttach(httpCon net.Conn, httpBuf *bufio.ReadWriter, stre
device := logLine.Device
var header []byte
headerLen := uint32(len(logLine.Msg))
-
+ logSize += len(logLine.Msg)
switch strings.ToLower(device) {
case "stdin":
header = makeHTTPAttachHeader(0, headerLen)
@@ -341,7 +342,7 @@ func (c *Container) HTTPAttach(httpCon net.Conn, httpBuf *bufio.ReadWriter, stre
if err := c.ReadLog(logOpts, logChan); err != nil {
return err
}
- logrus.Debugf("Done reading logs for container %s", c.ID())
+ logrus.Debugf("Done reading logs for container %s, %d bytes", c.ID(), logSize)
if err := <-errChan; err != nil {
return err
}