Accessing logs
Anyscale offers multiple ways to access logs for your Ray clusters.
Log viewer
The log viewer is an optional tool to view, search, and filter Ray jobs and services logs directly on the Anyscale console. Any workload created after enabling this feature sends logs to the Anyscale Control Plane, where they're retained for 30 days. You may incur extra data transfer costs from your cloud provider by enabling this feature. For Anyscale Hosted clouds, the log viewer is enabled by default. For self-hosted clouds, you must opt-in with the following command:
# Change the `cloud_id` to your cloud ID
anyscale cloud config update --cloud-id CLOUD_ID --enable-log-ingestion
See the See the CLI reference for more information.
To access the log viewer UI, select the Logs tab in the job or service detail page.
By default, the logs shown are from the last hour with no filters. You can change the time range by selecting an end time and window to look back.
To filter the logs, use the search bar to find specific keywords, request IDs, and regular expression patterns.
To disable log viewer, run
anyscale cloud config update --cloud-id CLOUD_ID --disable-log-ingestion
.
Subsequently, created Ray clusters won't send logs to the Anyscale Control Plane,
however, Anyscale retains previously sent logs for 30 days.
Ray Dashboard
Ray Dashboard is a consolidated tool for monitoring and debugging your applications available when the Ray cluster is running. To access the logs, select the Ray Dashboard tab and then Logs tab.
For information on the log files, see Configuring logging.
Logs CLI
To download logs, even after the cluster has terminated, run the following CLI command:
# Change `cluster_id` to your cluster ID
anyscale logs cluster --id CLUSTER_ID --download --download-dir /tmp
See the CLI reference for more information and options.
Find logs
Anyscale stores logs in {organization_id}/{cloud_id}/logs
and /logs
folders. The /logs
folder is a legacy location. Anyscale sends most logs to the {organization_id}/{cloud_id}/logs
folder.
Anyscale stores all job logs, web terminal command logs, and Ray logs. For performance reasons, Anyscale stores logs in various formats for different use cases. For example, when streaming logs, Anyscale may produce many small files to allow for fresher data to be downloaded by the user.