send( str(new Response( 200, ['Content-Type' => 'application/json'], json_encode($logger->getData(), JSON_INVALID_UTF8_IGNORE) )) ); $connection->close(); } }