Skip to main content

build_logs

Creates, updates, deletes, gets or lists a build_logs resource.

Overview​

Namebuild_logs
TypeResource
Idrailway.observability.build_logs

Fields​

The following fields are returned by SELECT queries:

One row per Log. The result of a logs query.

NameDatatypeDescription
attributesarrayThe attributes that were parsed from a structured log
messagestringThe contents of the log message
severitystringThe severity of the log message (eg. err)
tagsobjectThe tags that were associated with the log
timestampstringThe timestamp of the log message in format RFC3339 (nano)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdeployment_idend_date, filter, start_dateFetch 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.

NameDatatypeDescription
deployment_idstring
end_datestring (date-time)
filterstringFilter logs by a string. Providing an empty value will match all logs.
start_datestring (date-time)

SELECT examples​

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 }}'
;