deployment_logs
Creates, updates, deletes, gets or lists a deployment_logs
resource.
Overview
Name | deployment_logs |
Type | Resource |
Id | digitalocean.apps.deployment_logs |
Fields
The following fields are returned by SELECT
queries:
- apps_get_logs
- apps_get_logs_active_deployment
- apps_get_logs_aggregate
- apps_get_logs_active_deployment_aggregate
A JSON object with urls that point to archived logs
Name | Datatype | Description |
---|---|---|
historic_urls | array | (title: A list of URLs to archived log files) |
live_url | string | A 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. (example: ws://logs/build) |
A JSON object with urls that point to archived logs
Name | Datatype | Description |
---|---|---|
historic_urls | array | (title: A list of URLs to archived log files) |
live_url | string | A 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. (example: ws://logs/build) |
A JSON object with urls that point to archived logs
Name | Datatype | Description |
---|---|---|
historic_urls | array | (title: A list of URLs to archived log files) |
live_url | string | A 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. (example: ws://logs/build) |
A JSON object with urls that point to archived logs
Name | Datatype | Description |
---|---|---|
historic_urls | array | (title: A list of URLs to archived log files) |
live_url | string | A 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. (example: ws://logs/build) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
apps_get_logs | select | app_id , deployment_id , component_name , type | follow , pod_connection_timeout | Retrieve the logs of a past, in-progress, or active deployment. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. |
apps_get_logs_active_deployment | select | app_id , component_name , type | follow , pod_connection_timeout | 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. |
apps_get_logs_aggregate | select | app_id , deployment_id , type | follow , pod_connection_timeout | Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. |
apps_get_logs_active_deployment_aggregate | select | app_id , type | follow , pod_connection_timeout | 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. |
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 |
---|---|---|
app_id | string | The app ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf) |
component_name | string | An optional component name. If set, logs will be limited to this component only. (example: component) |
deployment_id | string | The deployment ID (example: 3aa4d20e-5527-4c00-b496-601fbd22520a) |
type | string | The type of logs to retrieve - BUILD: Build-time logs - DEPLOY: Deploy-time logs - RUN: Live run-time logs - RUN_RESTARTED: Logs of crashed/restarted instances during runtime (example: BUILD) |
follow | boolean | Whether the logs should follow live updates. (example: true) |
pod_connection_timeout | string | An optional time duration to wait if the underlying component instance is not immediately available. Default: 3m . (example: 3m) |
SELECT
examples
- apps_get_logs
- apps_get_logs_active_deployment
- apps_get_logs_aggregate
- apps_get_logs_active_deployment_aggregate
Retrieve the logs of a past, in-progress, or active deployment. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.
SELECT
historic_urls,
live_url
FROM digitalocean.apps.deployment_logs
WHERE app_id = '{{ app_id }}' -- required
AND deployment_id = '{{ deployment_id }}' -- required
AND component_name = '{{ component_name }}' -- required
AND type = '{{ type }}' -- required
AND follow = '{{ follow }}'
AND pod_connection_timeout = '{{ pod_connection_timeout }}';
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.deployment_logs
WHERE app_id = '{{ app_id }}' -- required
AND component_name = '{{ component_name }}' -- required
AND type = '{{ type }}' -- required
AND follow = '{{ follow }}'
AND pod_connection_timeout = '{{ pod_connection_timeout }}';
Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.
SELECT
historic_urls,
live_url
FROM digitalocean.apps.deployment_logs
WHERE app_id = '{{ app_id }}' -- required
AND deployment_id = '{{ deployment_id }}' -- required
AND type = '{{ type }}' -- required
AND follow = '{{ follow }}'
AND pod_connection_timeout = '{{ pod_connection_timeout }}';
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.deployment_logs
WHERE app_id = '{{ app_id }}' -- required
AND type = '{{ type }}' -- required
AND follow = '{{ follow }}'
AND pod_connection_timeout = '{{ pod_connection_timeout }}';