diff --git a/voicemeeterlib/event.py b/voicemeeterlib/event.py index 0c24b4d..9759bd2 100644 --- a/voicemeeterlib/event.py +++ b/voicemeeterlib/event.py @@ -1,14 +1,15 @@ import logging from typing import Iterable, Union +logger = logging.getLogger(__name__) + class Event: """Keeps track of event subscriptions""" - logger = logging.getLogger("event.event") - def __init__(self, subs: dict): self.subs = subs + self.logger = logger.getChild(self.__class__.__name__) def info(self, msg=None): info = (f"{msg} events",) if msg else () diff --git a/voicemeeterlib/subject.py b/voicemeeterlib/subject.py index fdca696..dda98b9 100644 --- a/voicemeeterlib/subject.py +++ b/voicemeeterlib/subject.py @@ -1,15 +1,16 @@ import logging +logger = logging.getLogger(__name__) + class Subject: """Adds support for observers""" - logger = logging.getLogger("subject.subject") - def __init__(self): """list of current observers""" self._observers = list() + self.logger = logger.getChild(self.__class__.__name__) @property def observers(self) -> list: