[Qemu-devel] [RFC 20/24] avocado_qemu: Set QMP log level to INFO

Eduardo Habkost posted 24 patches 7 years, 9 months ago
[Qemu-devel] [RFC 20/24] avocado_qemu: Set QMP log level to INFO
Posted by Eduardo Habkost 7 years, 9 months ago
From: Amador Pahim <apahim@redhat.com>

Otherwise we will see the debug messages in our test logs.

Signed-off-by: Amador Pahim <apahim@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 tests/avocado/avocado_qemu/test.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/avocado/avocado_qemu/test.py b/tests/avocado/avocado_qemu/test.py
index b921151bae..308fdfa514 100644
--- a/tests/avocado/avocado_qemu/test.py
+++ b/tests/avocado/avocado_qemu/test.py
@@ -235,6 +235,7 @@ class _VM(qemu.QEMUMachine):
         self.username = username
         self.password = password
         super(_VM, self).__init__(qemu_bin, name=self.name, arch=arch)
+        logging.getLogger('QMP').setLevel(logging.INFO)
 
     def get_console(self, console_address=None, prompt=r"[\#\$] "):
         """
-- 
2.14.3


Re: [Qemu-devel] [RFC 20/24] avocado_qemu: Set QMP log level to INFO
Posted by Eduardo Habkost 7 years, 9 months ago
On Fri, Apr 20, 2018 at 03:19:47PM -0300, Eduardo Habkost wrote:
> From: Amador Pahim <apahim@redhat.com>
> 
> Otherwise we will see the debug messages in our test logs.

Why don't we want to see the QMP debug messages when debugging is
enabled?

> 
> Signed-off-by: Amador Pahim <apahim@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  tests/avocado/avocado_qemu/test.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/avocado/avocado_qemu/test.py b/tests/avocado/avocado_qemu/test.py
> index b921151bae..308fdfa514 100644
> --- a/tests/avocado/avocado_qemu/test.py
> +++ b/tests/avocado/avocado_qemu/test.py
> @@ -235,6 +235,7 @@ class _VM(qemu.QEMUMachine):
>          self.username = username
>          self.password = password
>          super(_VM, self).__init__(qemu_bin, name=self.name, arch=arch)
> +        logging.getLogger('QMP').setLevel(logging.INFO)
>  
>      def get_console(self, console_address=None, prompt=r"[\#\$] "):
>          """
> -- 
> 2.14.3
> 

-- 
Eduardo