MCPcopy Create free account
hub / github.com/browser-use/macOS-use / QueueHandler

Class QueueHandler

gradio_app/src/utils/logging_utils.py:4–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import queue
3
4class QueueHandler(logging.Handler):
5 def __init__(self, log_queue):
6 super().__init__()
7 self.log_queue = log_queue
8
9 def emit(self, record):
10 try:
11 msg = self.format(record)
12 self.log_queue.put(f"{msg}\n")
13 except Exception:
14 self.handleError(record)
15
16def setup_logging(log_queue):
17 """Set up logging to capture terminal output"""

Callers 1

setup_loggingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected