mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
Merge pull request #10738 from microsoft/danmihai1/empty-pty-lines
runtime: skip empty Guest console output lines
This commit is contained in:
commit
0d93f59f5b
@ -1275,13 +1275,16 @@ func (cw *consoleWatcher) start(s *Sandbox) (err error) {
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
|
text := scanner.Text()
|
||||||
|
if text != "" {
|
||||||
s.Logger().WithFields(logrus.Fields{
|
s.Logger().WithFields(logrus.Fields{
|
||||||
"console-protocol": cw.proto,
|
"console-protocol": cw.proto,
|
||||||
"console-url": cw.consoleURL,
|
"console-url": cw.consoleURL,
|
||||||
"sandbox": s.id,
|
"sandbox": s.id,
|
||||||
"vmconsole": scanner.Text(),
|
"vmconsole": text,
|
||||||
}).Debug("reading guest console")
|
}).Debug("reading guest console")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err := scanner.Err(); err != nil {
|
if err := scanner.Err(); err != nil {
|
||||||
s.Logger().WithError(err).WithFields(logrus.Fields{
|
s.Logger().WithError(err).WithFields(logrus.Fields{
|
||||||
|
Loading…
Reference in New Issue
Block a user