build_logs
Creates, updates, deletes, gets or lists a build_logs resource.
Overview​
| Name | build_logs |
| Type | Resource |
| Id | railway.observability.build_logs |
Fields​
The following fields are returned by SELECT queries:
- list
One row per Log. The result of a logs query.
| Name | Datatype | Description |
|---|---|---|
attributes | array | The attributes that were parsed from a structured log |
message | string | The contents of the log message |
severity | string | The severity of the log message (eg. err) |
tags | object | The tags that were associated with the log |
timestamp | string | The timestamp of the log message in format RFC3339 (nano) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | deployment_id | end_date, filter, start_date | Fetch logs for a build. Backed by the Railway GraphQL query buildLogs. A SQL LIMIT is pushed down to the limit argument. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_id | string | |
end_date | string (date-time) | |
filter | string | Filter logs by a string. Providing an empty value will match all logs. |
start_date | string (date-time) |
SELECT examples​
- list
Fetch logs for a build. Backed by the Railway GraphQL query buildLogs. A SQL LIMIT is pushed down to the limit argument.
SELECT
attributes,
message,
severity,
tags,
timestamp
FROM railway.observability.build_logs
WHERE deployment_id = '{{ deployment_id }}' -- required
AND end_date = '{{ end_date }}'
AND filter = '{{ filter }}'
AND start_date = '{{ start_date }}'
;