<br />

<br />


**Managed Airflow (Gen 3)** \| [Managed Airflow (Gen 2)](https://docs.cloud.google.com/composer/docs/composer-2/view-logs "View this page for Managed Airflow (Gen 2)") \| [Managed Airflow (Legacy Gen 1)](https://docs.cloud.google.com/composer/docs/composer-1/view-logs "View this page for Managed Airflow (Legacy Gen 1)")

<br />

<br />

<br />

<br />

<br />

<br />

This page describes how to access and view Apache Airflow logs for
Managed Service for Apache Airflow.

## About log types

Managed Service for Apache Airflow has the following Airflow logs:

- [Streaming logs](https://docs.cloud.google.com/composer/docs/composer-3/view-logs#streaming). These logs contain Airflow task logs, as well
  as logs of Airflow components of your environment, such as Airflow
  schedulers and workers.

  To learn about Cloud Logging and Cloud Monitoring for your
  Managed Airflow environment, see
  [Monitor environments](https://docs.cloud.google.com/composer/docs/composer-3/monitor-environments).
- Managed Service for Apache Airflow generates [audit logs](https://docs.cloud.google.com/logging/docs/audit), such as Admin
  Activity logs. For more information, see
  [View audit logs](https://docs.cloud.google.com/composer/docs/composer-3/audit-logging).

## Before you begin

- Managed Airflow (Gen 3) environments
  **don't save Airflow task logs to the environment's bucket** . As an
  alternative, you can [configure a sink](https://docs.cloud.google.com/logging/docs/export/configure_export_v2) in
  Cloud Logging to route logs to any of the supported locations.

  For an example of routing environment logs to a Cloud Storage bucket,
  see
  [Restrict locations for Managed Airflow logs](https://docs.cloud.google.com/composer/docs/composer-3/configure-resource-location-restrictions#restrict-logs-location).

  > [!IMPORTANT]
  > **Important:** If you use a sink to route logs, we recommend to **keep environment logs in Cloud Logging** as well as in the configured location. If you use the provided example, skip the last step and don't add an exclusion for Cloud Logging.


## View streaming logs

To view streaming logs in Cloud Logging:

### Console

1. In the Google Cloud console, go to the **Environments** page.

   [Go to Environments](https://console.cloud.google.com/composer/environments)
2. In the list of environments, click the name of your environment.
   The **Environment details** page opens.

3. Go to the **Logs** tab.

## View streaming logs in Cloud Logging

To view streaming logs in Cloud Logging:

### Console

1. In the Google Cloud console, go to the **Environments** page.

   [Go to Environments](https://console.cloud.google.com/composer/environments)
2. In the list of environments, locate your environment.

3. in the **Logs** column, click the **Logs** link.

## What's next

- [Monitor environments](https://docs.cloud.google.com/composer/docs/composer-3/monitor-environments)
- [Managed Service for Apache Airflow audit logging](https://docs.cloud.google.com/composer/docs/composer-3/audit-logging)