API V2
Log Streaming
16 min
the log streaming endpoint allows you to access the stdout and stderr output from your game server containers this is invaluable for debugging issues, monitoring game server behavior, and gathering runtime information streaming logs endpoint get /logs query parameters parameter type required description id string yes the unique id of the session you want logs from follow boolean no whether to keep the stream open for new log entries (default false) example request get /logs?id=c595bc6f 8522 4a62 95cd 8742136643ea\&follow=true http/1 1 host api gameye io authorization bearer your token here success response on success, you'll receive a 200 ok response with the log output as a text stream 2023 04 01t12 00 00z \[info] game server starting 2023 04 01t12 00 01z \[info] loading map de dust2 2023 04 01t12 00 02z \[info] waiting for players to connect 2023 04 01t12 01 15z \[info] player connected player1 2023 04 01t12 01 30z \[info] player connected player2 error responses status code description 401 unauthorized invalid bearer token 404 not found session doesn't exist error response example { "statuscode" 404, "code" "resource not found", "message" "that session doesn't seem to exist ", "details" "double check the id ", "identifier" "3bc545b7 4750 47e6 a918 c93debc58663", "path" "/logs", "timestamp" "2023 04 01t12 00 00z" } 🔍 tip always include the identifier when contacting support about errors this helps us quickly trace the exact issue in our systems usage modes historical logs to get all available logs up to the current moment get /logs?id=c595bc6f 8522 4a62 95cd 8742136643ea http/1 1 this will return all logs that the container has written to stdout/stderr so far and then close the connection live log streaming to keep the connection open and receive new log entries as they occur get /logs?id=c595bc6f 8522 4a62 95cd 8742136643ea\&follow=true http/1 1 this is useful for real time monitoring of game server activity enhanced logging options two options are available for accessing logs session logs api endpoint (standard method) described in this document simple streaming of container logs suitable for most use cases elastic based solution (advanced) real time log access with advanced search capabilities indexed and searchable logs advanced filtering and analysis options contact support for access to this feature use cases debugging issues when players report problems, you can stream logs to identify error messages see warning signs track down the source of the issue monitoring game activity real time log streaming can help you see player connections and disconnections monitor match progress track game events operational insights logs can provide insights about server performance resource usage configuration issues best practices stream management for long running streams with follow=true , implement proper timeout and reconnection logic in your client log parsing consider implementing a log parser to extract structured data from the log stream sequential analysis for debugging complex issues, first get historical logs, then keep the stream open for follow up activities log retention remember that logs are only available while the session is running and shortly after it stops consider elastic logging for advanced use cases, ask about our elastic based logging solution implementation examples simple http client import requests \# stream logs with follow mode response = requests get( "https //api gameye io/logs", params={"id" "c595bc6f 8522 4a62 95cd 8742136643ea", "follow" true}, headers={"authorization" "bearer your token here"}, stream=true # important for handling streaming responses ) \# process the log stream for line in response iter lines() if line decoded line = line decode('utf 8') print(decoded line) \# process log line here web dashboard integration for web applications, you might want to fetch logs on demand when an admin views a session display logs in a scrollable, searchable interface highlight errors and warnings allow filtering by log level or keywords

