Improved logging setup

This commit is contained in:
Andrea Mistrali 2023-05-03 17:34:50 +02:00
parent 29f63cf09f
commit 8b8d49b2ee
No known key found for this signature in database
GPG Key ID: 6FB0A77F6D5DA9B2
1 changed files with 4 additions and 2 deletions

View File

@ -25,10 +25,12 @@ class ledPulse(threading.Thread):
def __init__(self, gpio, name="led0"):
self.log = logging.getLogger(self.__class__.__name__)
super().__init__(name=f"{self.__class__.__name}({name})",
daemon=True)
self.log = logging.getLogger(self.name)
self.gpio = gpio
super().__init__(name=name, daemon=True)
self.pwm_setup()