builtin-proxy: print guest console output to logger

So daemons such as containerd shimv2 can still see it.

Fixes: #647

Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
Peng Tao 2018-08-24 14:52:48 +08:00
parent 3f458187a4
commit 3940189be0

View File

@ -82,7 +82,10 @@ func (p *kataBuiltInProxy) watchConsole(proto, console string, logger *logrus.En
go func() {
scanner = bufio.NewScanner(conn)
for scanner.Scan() {
fmt.Printf("[SB-%s] vmconsole: %s\n", p.sandboxID, scanner.Text())
logger.WithFields(logrus.Fields{
"sandbox": p.sandboxID,
"vmconsole": scanner.Text(),
}).Debug("reading guest console")
}
if err := scanner.Err(); err != nil {