Update WebSocket.php

Implementation of optional logger