Get real-time logs
This streams the output that the game server writes. Unlike /query/log, this opens up a stream that we’ll keep open until the underlying container stops. You can use it to debug server issues.
There are two content types available:
- Text (plain). This can be helpful for regular purposes, like debugging the containerized application.
- Application (JSON). Good for advanced cases where you need to distinguish between different stream types.
{ "tab": "examples", "url": "https://api.gameye.io/logs", "name": "Get real-time logs", "method": "GET", "request": { "pathParameters": [], "queryParameters": [], "headerParameters": [], "bodyDataParameters": [ { "kind": "required", "name": "matchKey", "type": "string", "description": "The unique ID of the session you want logs from.\n\nThis parameter is now old. And we've replaced it with a new one with more consistent naming." } ], "formDataParameters": [] }, "results": { "languages": [ { "id": "9gBvpNmsZnIG4hEE3-LIS", "code": "// A stream of logs has been opened that will continue to stream any\nlogs from the underlying container until the container has been \nterminated.\n \n{\n \"streamType\": 1,\n \"line\": \"2022/03/29 13:37:26 [notice] 1#1: start worker process 30\"\n}", "language": "200", "customLabel": "" }, { "id": "YL5ku_RQn_dYACbp6IiBy", "code": "// You are not authorized. Please make sure that the included bearer token is correct.\n ", "language": "401", "customLabel": "" }, { "id": "0sxZ5WQKDA_Pv1pf9zdtC", "code": "// Could not find the associated session.", "language": "404", "customLabel": "" } ], "selectedLanguageId": "0sxZ5WQKDA_Pv1pf9zdtC" }, "examples": { "languages": [ { "id": "aj0k3HTO7ti4IdnVwsBdZ", "code": "curl --location --request GET 'https://api.gameye.io/logs?matchKey=string' \\\n--header 'Accept: application/json'", "language": "curl", "customLabel": "" }, { "id": "4v1-fj-glLjhtCvWiXkZ8", "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\n\nvar requestOptions = {\n method: 'GET',\n headers: myHeaders,\n redirect: 'follow'\n};\n\nfetch(\"https://api.gameye.io/logs?matchKey=string\", requestOptions)\n .then(response => response.text())\n .then(result => console.log(result))\n .catch(error => console.log('error', error));", "language": "javascript", "customLabel": "" }, { "id": "8uJploTp8p76A59R7Wp0p", "code": "import requests\n\nurl = \"https://api.gameye.io/logs?matchKey=string\"\n\npayload={}\nheaders = {\n 'Accept': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n", "language": "python", "customLabel": "" }, { "id": "JV6abSp1tB_k_y4d8lUBU", "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.gameye.io/logs?matchKey=string\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n", "language": "ruby", "customLabel": "" } ], "selectedLanguageId": "JV6abSp1tB_k_y4d8lUBU" }, "description": "", "currentNewParameter": { "label": "Body Parameter", "value": "bodyDataParameters" }}