mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2026-04-18 04:33:29 +00:00
add module level logger
This commit is contained in:
@@ -28,7 +28,7 @@ class Remote(CBindings):
|
||||
self.cache = {}
|
||||
self.midi = Midi()
|
||||
self.subject = self.observer = Subject()
|
||||
self.running = None
|
||||
self.running = False
|
||||
self.event = Event(
|
||||
{k: kwargs.pop(k) for k in ("pdirty", "mdirty", "midi", "ldirty")}
|
||||
)
|
||||
@@ -53,16 +53,14 @@ class Remote(CBindings):
|
||||
"""Starts updates thread."""
|
||||
self.running = True
|
||||
self.event.info()
|
||||
self.cache["strip_level"], self.cache["bus_level"] = self._get_levels()
|
||||
|
||||
self.logger.debug("initiating events thread")
|
||||
queue = Queue()
|
||||
self.updater = Updater(self, queue)
|
||||
self.updater.start()
|
||||
self.producer = Producer(self, queue)
|
||||
self.producer.start()
|
||||
|
||||
self.logger.debug("events thread initiated!")
|
||||
|
||||
def login(self) -> NoReturn:
|
||||
"""Login to the API, initialize dirty parameters"""
|
||||
res = self.call(self.vm_login, ok=(0, 1))
|
||||
@@ -298,8 +296,8 @@ class Remote(CBindings):
|
||||
self.logger.info(f"{type(self).__name__}: Successfully logged out of {self}")
|
||||
|
||||
def end_thread(self):
|
||||
self.logger.debug("events thread shutdown started")
|
||||
self.running = False
|
||||
self.logger.debug("events thread stopped")
|
||||
|
||||
def __exit__(self, exc_type, exc_value, exc_traceback) -> NoReturn:
|
||||
"""teardown procedures"""
|
||||
|
||||
Reference in New Issue
Block a user