From c018d2dd1d7e7f1cc19b25f6ec74b3dec44ae9b9 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 12 Nov 2025 21:20:07 -0500 Subject: Cleanup some logging setup code I think the calls to Log.setup() were accidentally creating multiple loggers, hopefully this fixes the problem. --- Omni/Bild/Example.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Omni/Bild/Example.py') diff --git a/Omni/Bild/Example.py b/Omni/Bild/Example.py index 7d57890..1b2f61d 100755 --- a/Omni/Bild/Example.py +++ b/Omni/Bild/Example.py @@ -8,12 +8,14 @@ Example Python file that also serves as a test case for bild. # : out example # : dep cryptography import cryptography.fernet +import logging import Omni.App as App import Omni.Log as Log import Omni.Test as Test import sys -log = Log.setup() +logger = logging.getLogger(__name__) +Log.setup(logger) def cryptic_hello(name: str) -> str: @@ -28,7 +30,7 @@ def cryptic_hello(name: str) -> str: key = cryptography.fernet.Fernet.generate_key() f = cryptography.fernet.Fernet(key) token = f.encrypt(hello(name).encode("utf-8")) - log.info("attempting decryption") + logger.info("attempting decryption") ret = f.decrypt(token).decode("utf-8") if ret != hello(name): msg = "en/decryption failed!" -- cgit v1.2.3