Merge pull request #166 from kata-containers/egernst-patch-1

qmp: remove chatty log
This commit is contained in:
Fabiano Fidêncio 2021-04-26 23:36:31 +02:00 committed by GitHub
commit 7183b12b07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,10 +267,6 @@ func (q *QMP) readLoop(fromVMCh chan<- []byte) {
for scanner.Scan() {
line := scanner.Bytes()
if q.cfg.Logger.V(1) {
q.cfg.Logger.Infof("read from QMP: %s", string(line))
}
// Since []byte channel type transfer slice info(include slice underlying array pointer, len, cap)
// between channel sender and receiver. scanner.Bytes() returned slice's underlying array
// may point to data that will be overwritten by a subsequent call to Scan(reference from:
@ -442,7 +438,6 @@ func (q *QMP) writeNextQMPCommand(cmdQueue *list.List) {
}
cmdQueue.Remove(cmdEl)
}
q.cfg.Logger.Infof("%s", string(encodedCmd))
encodedCmd = append(encodedCmd, '\n')
if unixConn, ok := q.conn.(*net.UnixConn); ok && len(cmd.oob) > 0 {
_, _, err = unixConn.WriteMsgUnix(encodedCmd, cmd.oob, nil)