1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 04:18:10 +00:00

fix(python): nest logger in the proper way (#3190)

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
This commit is contained in:
Ferdinando M. Ametrano 2023-08-03 14:41:40 +02:00 committed by GitHub
parent 9f6f250070
commit 59ba113b07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,6 @@ def enable_debug_output(
if verbosity > 2: if verbosity > 2:
level = DUMP_PACKETS level = DUMP_PACKETS
logger = logging.getLogger("trezorlib") logger = logging.getLogger(__name__.rsplit(".", 1)[0])
logger.setLevel(level) logger.setLevel(level)
logger.addHandler(handler) logger.addHandler(handler)