Hello everyone! I’m happy to announce two new enhancements we’ve made: structured logs and custom timeouts.
We’re working on getting the documentation updated, but in the meantime you can follow the examples in the rest of this post to use the new features.
Structured Logs
Currently, when retrieving task logs, only the log messages are available. We’ve added a new option to retrieve structured logs that also include metadata, namely the timestamp as well as MessageType of the log entry.
To retrieve logs in the new format, add the URL parameter ?view=STRUCTURED
. Here’s an example full URL: https://apis.roblox.com/cloud/v2/universes/6389275850/places/18863827952/versions/34/luau-execution-sessions/a3499fa8-645a-4856-b929-106dd1420b31/tasks/a3499fa8-645a-4856-b929-106dd1420b31/logs?view=STRUCTURED
The structured logs will be in a new field in the response, called structuredMessages
. An example response is below:
{
"luauExecutionSessionTaskLogs": [
{
"path": "universes/6389275850/places/18863827952/versions/34/luau-execution-sessions/a3499fa8-645a-4856-b929-106dd1420b31/tasks/a3499fa8-645a-4856-b929-106dd1420b31/logs/1",
"messages": [],
"structuredMessages": [
{
"message": "TestService: this action is invalid",
"createTime": "2025-02-13T20:32:41.069Z",
"messageType": "WARNING"
}
]
}
],
"nextPageToken": ""
}
Note that using the STRUCTURED view is optional. To continue using the existing behavior, simply leave out the view
parameter or set it to FLAT
.
Custom Timeouts
You can now customize the task script timeout using a new parameter called timeout
in the CreateLuauExecutionSessionTask
API.
Here’s an example request body:
{"script": "wait(10)", "timeout": "1s"}
The above will cause the script to timeout after 1 second (instead of the default 5 minutes).
The timeout
can be set to any value between 1 second and 300 seconds (5 minutes).
See the documentation for Duration for the formatting of the timeout value.