Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@
from loguru import logger as log
from obsws_python.error import OBSSDKRequestError
import uuid
import logging
import threading

class _ThreadBoundFilter(logging.Filter):
"""Temporarily suppress sub‑CRITICAL log records from the creating thread only."""

def __init__(self):
super().__init__()
self._thread_id = threading.get_ident()

def filter(self, record):
if threading.get_ident() == self._thread_id:
return record.levelno >= logging.CRITICAL
return True


class Backend(BackendBase):
Expand Down Expand Up @@ -67,10 +53,6 @@ def connect_to(
log.error("Invalid IP address for OBS connection")
return False

obs_logger = logging.getLogger("obsws_python")
obs_filter = _ThreadBoundFilter()
obs_logger.addFilter(obs_filter)

try:
log.debug("Trying to connect to OBS")
self.obs_client = obs.ReqClient(
Expand All @@ -93,8 +75,6 @@ def connect_to(
log.error(f"Failed to connect to OBS: {e}")
self.connected = False
return False
finally:
obs_logger.removeFilter(obs_filter)

def get_connected(self) -> bool:
return self.connected
Expand Down