Add exception logging for WebSocket server.