From 566054a0bc0cdc6f4ef999f5859a939fc7bf563b Mon Sep 17 00:00:00 2001 From: Oksana Vohchana Date: Mon, 16 Mar 2020 12:32:03 +0200 Subject: 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 Reviewed-by: John Snow Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Message-Id: <20200316103203.10046-1-ovoshcha@redhat.com> Signed-off-by: Cleber Rosa --- python/qemu/machine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/qemu/machine.py') diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 183d8f3..f53abfa 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: -- cgit v1.1