Core classes, functions, and methods:
- `WebSocketLogger`: A class that handles logging of websocket messages.
- `__init__(self, tab_id: int, connection_id: str, file_path: str)`: Initializes the WebSocketLogger with the tab ID, connection ID, and file path for the log file.
- `log_sent_message(self, message: str)`: Logs a sent message to the log file.
- `log_received_message(self, message: str)`: Logs a received message to the log file.
- `close(self)`: Closes the log file.
- `WebSocketHandler`: A class that handles websocket messages and logs them using the WebSocketLogger.
- `__init__(self, tab_id: int, connection_id: str, file_path: str)`: Initializes the WebSocketHandler with the tab ID, connection ID, and file path for the log file.
- `on_message(self, message: str)`: Handles a websocket message and logs it using the WebSocketLogger.
- `on_close(self)`: Closes the WebSocketLogger.
- `DevToolsWebSocket`: A class that extends the `WebSocket` class from the `websockets` library and adds a `WebSocketHandler` to log messages.
- `__init__(self, *args, **kwargs)`: Initializes the DevToolsWebSocket with the arguments passed to the `WebSocket` constructor.
- `set_handler(self, handler: WebSocketHandler)`: Sets the `WebSocketHandler` for the DevToolsWebSocket to log messages.
- `send(self, data: Any, **kwargs)`: Sends a websocket message and logs it using the `WebSocketHandler`.
etc.