From 1d563cadc43cbd82ee0fb0a7ab8c7c7e7e3f28a2 Mon Sep 17 00:00:00 2001 From: "Ferdinando M. Ametrano" Date: Wed, 2 Aug 2023 22:58:21 +0200 Subject: [PATCH] nest logger in the proper way this way logger is properly nested even when the library is used as submodule (e.g. HWI) see https://github.com/bitcoin-core/HWI/pull/697 --- python/src/trezorlib/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/src/trezorlib/log.py b/python/src/trezorlib/log.py index 9cc4a6b9aa..6a6c3717c8 100644 --- a/python/src/trezorlib/log.py +++ b/python/src/trezorlib/log.py @@ -70,6 +70,6 @@ def enable_debug_output( if verbosity > 2: level = DUMP_PACKETS - logger = logging.getLogger("trezorlib") + logger = logging.getLogger(__name__.rsplit(".", 1)[0]) logger.setLevel(level) logger.addHandler(handler)