summary refs log tree commit diff stats
path: root/python/qemu/machine.py
diff options
context:
space:
mode:
authorOksana Vohchana <ovoshcha@redhat.com>2020-03-16 12:32:03 +0200
committerCleber Rosa <crosa@redhat.com>2020-03-17 17:55:57 -0400
commit566054a0bc0cdc6f4ef999f5859a939fc7bf563b (patch)
tree49d677e2c3b0195738bbb4e8372be72419aef663 /python/qemu/machine.py
parentd649689a8ecb2e276cc20d3af6d416e3c299cb17 (diff)
downloadfocaccia-qemu-566054a0bc0cdc6f4ef999f5859a939fc7bf563b.tar.gz
focaccia-qemu-566054a0bc0cdc6f4ef999f5859a939fc7bf563b.zip
python/qemu/qmp.py: QMP debug with VM label
QEMUMachine writes some messages to the default logger.
But it sometimes hard to read the output if we have requests to
more than one VM.
This patch adds a label to the logger in the debug mode.

Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20200316103203.10046-1-ovoshcha@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Diffstat (limited to 'python/qemu/machine.py')
-rw-r--r--python/qemu/machine.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index 183d8f3d38..f53abfa492 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -270,7 +270,8 @@ class QEMUMachine(object):
                 self._vm_monitor = os.path.join(self._sock_dir,
                                                 self._name + "-monitor.sock")
                 self._remove_files.append(self._vm_monitor)
-            self._qmp = qmp.QEMUMonitorProtocol(self._vm_monitor, server=True)
+            self._qmp = qmp.QEMUMonitorProtocol(self._vm_monitor, server=True,
+                                                nickname=self._name)
 
     def _post_launch(self):
         if self._qmp: