mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2024-11-15 16:40:46 +00:00
add module level loggers
This commit is contained in:
parent
064cfeb23d
commit
342a49804f
@ -1,14 +1,15 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Iterable, Union
|
from typing import Iterable, Union
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Event:
|
class Event:
|
||||||
"""Keeps track of event subscriptions"""
|
"""Keeps track of event subscriptions"""
|
||||||
|
|
||||||
logger = logging.getLogger("event.event")
|
|
||||||
|
|
||||||
def __init__(self, subs: dict):
|
def __init__(self, subs: dict):
|
||||||
self.subs = subs
|
self.subs = subs
|
||||||
|
self.logger = logger.getChild(self.__class__.__name__)
|
||||||
|
|
||||||
def info(self, msg=None):
|
def info(self, msg=None):
|
||||||
info = (f"{msg} events",) if msg else ()
|
info = (f"{msg} events",) if msg else ()
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Subject:
|
class Subject:
|
||||||
"""Adds support for observers"""
|
"""Adds support for observers"""
|
||||||
|
|
||||||
logger = logging.getLogger("subject.subject")
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""list of current observers"""
|
"""list of current observers"""
|
||||||
|
|
||||||
self._observers = list()
|
self._observers = list()
|
||||||
|
self.logger = logger.getChild(self.__class__.__name__)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def observers(self) -> list:
|
def observers(self) -> list:
|
||||||
|
Loading…
Reference in New Issue
Block a user