qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PULL 16/22] tests/functional: include logger name and function in messages
Date: Mon,  3 Nov 2025 11:58:13 +0100	[thread overview]
Message-ID: <20251103105824.322039-17-thuth@redhat.com> (raw)
In-Reply-To: <20251103105824.322039-1-thuth@redhat.com>

From: Daniel P. Berrangé <berrange@redhat.com>

As we collect debug logs from a wide range of code it becomes
increasingly confusing to understand where each log messages comes
from. Adding "%(name)s" gives us the logger name, which is usually
based on the python __name__ symbol, aka the code module name.
Then "%(funcName)s" completes the story by identifying the function.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251028182651.873256-2-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/functional/qemu_test/testcase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index a122acb5609..d9d114e63e3 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -217,7 +217,7 @@ def setUp(self):
         self._log_fh = logging.FileHandler(self.log_filename, mode='w')
         self._log_fh.setLevel(logging.DEBUG)
         fileFormatter = logging.Formatter(
-            '%(asctime)s - %(levelname)s: %(message)s')
+            '%(asctime)s - %(levelname)s: %(name)s.%(funcName)s %(message)s')
         self._log_fh.setFormatter(fileFormatter)
         self.log.addHandler(self._log_fh)
 
-- 
2.51.0



  parent reply	other threads:[~2025-11-03 10:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 10:57 [PULL 00/22] Functional tests and s390x patches for the softfreeze Thomas Huth
2025-11-03 10:57 ` [PULL 01/22] scripts/device-crash-test: fix spurious EOFError messages Thomas Huth
2025-11-03 10:57 ` [PULL 02/22] tests/functional: Fix problems in asset.py reported by pylint Thomas Huth
2025-11-03 10:58 ` [PULL 03/22] tests/functional: Fix problems in decorators.py " Thomas Huth
2025-11-03 10:58 ` [PULL 04/22] tests/functional: Fix problems in linuxkernel.py " Thomas Huth
2025-11-03 10:58 ` [PULL 05/22] tests/functional: Fix problems in uncompress.py " Thomas Huth
2025-11-03 10:58 ` [PULL 06/22] tests/functional: Fix problems in utils.py " Thomas Huth
2025-11-03 10:58 ` [PULL 07/22] tests/functional/arm/test_aspeed_ast1030: Remove unused import Thomas Huth
2025-11-03 10:58 ` [PULL 08/22] tests/functional/.../testcase.py: better socketdir cleanup Thomas Huth
2025-11-03 10:58 ` [PULL 09/22] MAINTAINERS: fix functional tests section Thomas Huth
2025-11-03 10:58 ` [PULL 10/22] tests/functional/migration: Fix bad indentation Thomas Huth
2025-11-03 10:58 ` [PULL 11/22] tests/functional/ppc64/test_mac99: Fix style issues reported by pylint Thomas Huth
2025-11-03 10:58 ` [PULL 12/22] tests/functional/rx/test_gdbsim: Remove unused variables Thomas Huth
2025-11-03 10:58 ` [PULL 13/22] tests/functional/x86_64/test_acpi_bits: Silence warnings reported by pylint Thomas Huth
2025-11-03 10:58 ` [PULL 14/22] tests/functional/x86_64/test_virtio_balloon: Fix cosmetic issues from pylint Thomas Huth
2025-11-03 10:58 ` [PULL 15/22] tests/functional/ppc64: Fix class names to silence pylint warnings Thomas Huth
2025-11-03 10:58 ` Thomas Huth [this message]
2025-11-03 10:58 ` [PULL 17/22] tests/functional: include the lower level QMP log messages Thomas Huth
2025-11-03 10:58 ` [PULL 18/22] hw/s390x: Use memory_region_size() Thomas Huth
2025-11-03 10:58 ` [PULL 19/22] target/s390x: Fix missing interrupts for small CKC values Thomas Huth
2025-11-03 10:58 ` [PULL 20/22] target/s390x: Fix missing clock-comparator interrupts after reset Thomas Huth
2025-11-03 10:58 ` [PULL 21/22] target/s390x: Use address generation for register branch targets Thomas Huth
2025-11-03 10:58 ` [PULL 22/22] tests/tcg/s390x: Test SET CLOCK COMPARATOR Thomas Huth
2025-11-04 13:57 ` [PULL 00/22] Functional tests and s390x patches for the softfreeze Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251103105824.322039-17-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).