---
title: "Logs CLI reference"
description: "Customer-hosted cloud features"
---

# Logs CLI reference

#### Customer-hosted cloud features

:::note
Some features are only available on customer-hosted clouds. Reach out to [support@anyscale.com](mailto:support@anyscale.com) for info.
:::

## Logs CLI

### `anyscale logs workspace`

**Usage**

`anyscale logs workspace [OPTIONS] [GLOB]`

Access log files of a workspace.

**Options**

-   **`--id`**: Provide a workspace ID.
-   **`-d/--download`**: Download logs to the current working directory, or a specified path.
-   **`-t/--tail`**: Read the last N lines of logs.
-   **`-ip/--node-ip`**: Filter logs by a node IP.
-   **`--instance-id`**: Filter logs by an instance ID.
-   **`--worker-only`**: Download logs of only the worker nodes.
-   **`--head-only`**: Download logs of only the head node.
-   **`--download-dir`**: Directory to download logs into.

### `anyscale logs service`

**Usage**

`anyscale logs service [OPTIONS] [GLOB]`

Access log files of a service for a single service version.

**Options**

-   **`--id`**: Provide a service ID.
-   **`--version`**: Service version name or ID to get logs from. If not specified, uses the latest running version.
-   **`-d/--download`**: Download logs to the current working directory, or a specified path.
-   **`-t/--tail`**: Read the last N lines of logs.
-   **`-ip/--node-ip`**: Filter logs by a node IP.
-   **`--instance-id`**: Filter logs by an instance ID.
-   **`--worker-only`**: Download logs of only the worker nodes.
-   **`--head-only`**: Download logs of only the head node.
-   **`--download-dir`**: Directory to download logs into.

### `anyscale logs job`

**Usage**

`anyscale logs job [OPTIONS] [GLOB]`

Access log files of a production job. Fetches logs for all job attempts.

**Options**

-   **`--id`**: Provide a production job ID.
-   **`-d/--download`**: Download logs to the current working directory, or a specified path.
-   **`-t/--tail`**: Read the last N lines of logs.
-   **`-ip/--node-ip`**: Filter logs by a node IP.
-   **`--instance-id`**: Filter logs by an instance ID.
-   **`--worker-only`**: Download logs of only the worker nodes.
-   **`--head-only`**: Download logs of only the head node.
-   **`--download-dir`**: Directory to download logs into.

### `anyscale logs cluster`

**Usage**

`anyscale logs cluster [OPTIONS] [GLOB]`

Access log files of a cluster.

**Options**

-   **`--id`**: Provide a cluster ID.
-   **`-d/--download`**: Download logs to the current working directory, or a specified path.
-   **`-t/--tail`**: Read the last N lines of logs.
-   **`-ip/--node-ip`**: Filter logs by a node IP.
-   **`--instance-id`**: Filter logs by an instance ID.
-   **`--worker-only`**: Download logs of only the worker nodes.
-   **`--head-only`**: Download logs of only the head node.
-   **`--download-dir`**: Directory to download logs into.

---

Previous: [Job](/reference/cli/job.md) | Next: [Machine pool](/reference/cli/machine-pool.md)