mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
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:
parent
3f458187a4
commit
3940189be0
@ -82,7 +82,10 @@ func (p *kataBuiltInProxy) watchConsole(proto, console string, logger *logrus.En
|
|||||||
go func() {
|
go func() {
|
||||||
scanner = bufio.NewScanner(conn)
|
scanner = bufio.NewScanner(conn)
|
||||||
for scanner.Scan() {
|
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 {
|
if err := scanner.Err(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user