mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2024-11-22 04:40:53 +00:00
added module level loggers.
class loggers implemented as child loggers. patch bump
This commit is contained in:
parent
4e45de17ea
commit
2c07f242ad
@ -11,11 +11,12 @@ from websocket import WebSocketTimeoutException
|
|||||||
|
|
||||||
from .error import OBSSDKError, OBSSDKTimeoutError
|
from .error import OBSSDKError, OBSSDKTimeoutError
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ObsClient:
|
class ObsClient:
|
||||||
logger = logging.getLogger("baseclient.obsclient")
|
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
self.logger = logger.getChild(self.__class__.__name__)
|
||||||
defaultkwargs = {
|
defaultkwargs = {
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"port": 4455,
|
"port": 4455,
|
||||||
|
@ -16,12 +16,14 @@ defined in official github repo
|
|||||||
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#events
|
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#events
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class EventClient:
|
class EventClient:
|
||||||
logger = logging.getLogger("events.eventclient")
|
|
||||||
DELAY = 0.001
|
DELAY = 0.001
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
self.logger = logger.getChild(self.__class__.__name__)
|
||||||
defaultkwargs = {"subs": Subs.LOW_VOLUME}
|
defaultkwargs = {"subs": Subs.LOW_VOLUME}
|
||||||
kwargs = defaultkwargs | kwargs
|
kwargs = defaultkwargs | kwargs
|
||||||
self.base_client = ObsClient(**kwargs)
|
self.base_client = ObsClient(**kwargs)
|
||||||
|
@ -10,11 +10,12 @@ defined in official github repo
|
|||||||
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#Requests
|
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#Requests
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ReqClient:
|
class ReqClient:
|
||||||
logger = logging.getLogger("reqs.reqclient")
|
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
self.logger = logger.getChild(self.__class__.__name__)
|
||||||
self.base_client = ObsClient(**kwargs)
|
self.base_client = ObsClient(**kwargs)
|
||||||
if self.base_client.authenticate():
|
if self.base_client.authenticate():
|
||||||
self.logger.info(f"Successfully identified {self} with the server")
|
self.logger.info(f"Successfully identified {self} with the server")
|
||||||
|
@ -1 +1 @@
|
|||||||
version = "1.5.0"
|
version = "1.5.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user