Skip to main content

logs

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

Overview

Namelogs
TypeResource
Iddigitalocean.apps.logs

Fields

NameDatatypeDescription
historic_urlsarray
live_urlstringA URL of the real-time live logs. This URL may use either the https:// or wss:// protocols and will keep pushing live logs as they become available.

Methods

NameAccessible byRequired ParamsDescription
apps_get_logs_active_deployment_aggregateSELECTapp_id, typeRetrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id.

SELECT examples

Retrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id.

SELECT
historic_urls,
live_url
FROM digitalocean.apps.logs
WHERE app_id = '{{ app_id }}'
AND type = '{{ type }}';