Merge pull request #4746 from liubin/fix/4745-add-log-field

runtime: explicitly mark the source of the log is from qemu.log
This commit is contained in:
Tim Zhang
2022-08-08 15:21:01 +08:00
committed by GitHub

View File

@@ -987,7 +987,7 @@ func (q *qemu) StopVM(ctx context.Context, waitOnly bool) error {
if err == nil {
scanner := bufio.NewScanner(f)
for scanner.Scan() {
q.Logger().Debug(scanner.Text())
q.Logger().WithField("file", q.qemuConfig.LogFile).Debug(scanner.Text())
}
if err := scanner.Err(); err != nil {
q.Logger().WithError(err).Debug("read qemu log failed")