mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #16994 from Microsoft/10662-copied
Windows: Fix annoying bad log
This commit is contained in:
commit
8c1fa7f320
1 changed files with 11 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
||||||
package windows
|
package windows
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
|
@ -22,7 +23,11 @@ func startStdinCopy(dst io.WriteCloser, src io.Reader) {
|
||||||
go func() {
|
go func() {
|
||||||
defer dst.Close()
|
defer dst.Close()
|
||||||
bytes, err := io.Copy(dst, src)
|
bytes, err := io.Copy(dst, src)
|
||||||
logrus.Debugf("Copied %d bytes from stdin err=%s", bytes, err)
|
log := fmt.Sprintf("Copied %d bytes from stdin.", bytes)
|
||||||
|
if err != nil {
|
||||||
|
log = log + " err=" + err.Error()
|
||||||
|
}
|
||||||
|
logrus.Debugf(log)
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +40,11 @@ func startStdouterrCopy(dst io.Writer, src io.ReadCloser, name string) {
|
||||||
go func() {
|
go func() {
|
||||||
defer src.Close()
|
defer src.Close()
|
||||||
bytes, err := io.Copy(dst, src)
|
bytes, err := io.Copy(dst, src)
|
||||||
logrus.Debugf("Copied %d bytes from %s err=%s", bytes, name, err)
|
log := fmt.Sprintf("Copied %d bytes from %s.", bytes, name)
|
||||||
|
if err != nil {
|
||||||
|
log = log + " err=" + err.Error()
|
||||||
|
}
|
||||||
|
logrus.Debugf(log)
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue