Il 15 settembre 2026, tutti gli ambienti Cloud Composer 1 e Cloud Composer 2 versione 2.0.x raggiungeranno la fine del ciclo di vita pianificata e non potrai più utilizzarli. Ti consigliamo di pianificare la migrazione a Cloud Composer 3.
Questa pagina descrive come accedere e visualizzare i log di Apache Airflow per
Cloud Composer.
Informazioni sui tipi di log
Cloud Composer ha i seguenti log di Airflow:
Log di streaming. Questi log contengono i log delle attività di Airflow, nonché i log dei componenti Airflow del tuo ambiente, come gli scheduler e i worker di Airflow.
Per scoprire di più su Cloud Logging e Cloud Monitoring per il tuo ambiente Cloud Composer, consulta Monitorare gli ambienti.
Il tuo Account Google deve avere un ruolo che consenta di visualizzare gli oggetti nei bucket dell'ambiente. Per ulteriori informazioni, consulta Controllo dell'accesso.
I log archiviati nel bucket dell'ambiente utilizzano il criterio del bucket.
Cloud Composer crea bucket con il criterio predefinito che conserva i dati per sempre. Per i log archiviati in Cloud Logging, Cloud Composer utilizza i periodi di conservazione dei log_Default e definiti dall'utente.
Per evitare la perdita di dati, i log salvati nel bucket dell'ambiente
non vengono eliminati dopo l'eliminazione dell'ambiente. Devi eliminare manualmente i log dal bucket del tuo ambiente.
Visualizza i log in streaming
Per visualizzare i log in streaming in Cloud Logging:
Console
Nella Google Cloud console, vai alla pagina Ambienti.
Nell'elenco degli ambienti, trova una riga con il nome del tuo ambiente
e nella colonna Cartella DAG fai clic sul link DAG. Viene visualizzata la pagina Dettagli bucket.
Nel riquadro Browser di cartelle, fai clic su /logs.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-08-26 UTC."],[[["\u003cp\u003eCloud Composer offers different types of Airflow logs, including streaming logs for Airflow task and component activity, as well as logs associated with single DAG tasks stored in the environment's bucket.\u003c/p\u003e\n"],["\u003cp\u003eStreaming logs for Cloud Composer can be accessed via the "Logs" tab within the Google Cloud console's Environment details page.\u003c/p\u003e\n"],["\u003cp\u003eAirflow task logs in the environment's bucket can be accessed by navigating to the "DAGs" link in the console, and subsequently clicking on the \u003ccode\u003e/logs\u003c/code\u003e folder in the "Bucket details" page.\u003c/p\u003e\n"],["\u003cp\u003eLogs stored in environment's bucket are not deleted when the environment is deleted and must be manually removed.\u003c/p\u003e\n"],["\u003cp\u003eYour Google Account needs to have the necessary permissions to view objects in environment buckets to view the logs.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n[Cloud Composer 3](/composer/docs/composer-3/view-logs \"View this page for Cloud Composer 3\") \\| [Cloud Composer 2](/composer/docs/composer-2/view-logs \"View this page for Cloud Composer 2\") \\| **Cloud Composer 1**\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes how to access and view Apache Airflow logs for\nCloud Composer.\n\nAbout log types\n\nCloud Composer has the following Airflow logs:\n\n- [Streaming logs](#streaming). These logs contain Airflow task logs, as well\n as logs of Airflow components of your environment, such as Airflow\n schedulers and workers.\n\n To learn about Cloud Logging and Cloud Monitoring for your\n Cloud Composer environment, see\n [Monitor environments](/composer/docs/composer-1/monitor-environments).\n- [Airflow task logs in the environment's bucket](#view-bucket). These logs are\n associated with single DAG tasks.\n\n Cloud Composer saves files with Airflow task logs to the `/logs`\n folder.\n\n- Cloud Composer generates [audit logs](/logging/docs/audit), such as Admin\n Activity logs. For more information, see\n [View audit logs](/composer/docs/composer-1/audit-logging).\n\nBefore you begin\n\n\u003cbr /\u003e\n\n- Your Google Account must have a role that can view objects in environment\n buckets. For more information, see [Access control](/composer/docs/composer-1/access-control).\n\n- Logs stored in environment's bucket use the policy of the bucket.\n Cloud Composer creates buckets with the default policy that keeps\n data forever. For logs stored in Cloud Logging,\n Cloud Composer uses `_Default` and User-defined\n [logs retention periods](/logging/quotas#logs_retention_periods).\n\n- To prevent data loss, logs saved in environment's bucket\n **are not deleted after you delete your environment**. You must manually\n delete logs from your environment's bucket.\n\nView streaming logs\n\nTo view streaming logs in Cloud Logging: \n\nConsole\n\n1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n2. In the list of environments, click the name of your environment.\n The **Environment details** page opens.\n\n3. Go to the **Logs** tab.\n\nView streaming logs in Cloud Logging\n\nTo view streaming logs in Cloud Logging: \n\nConsole\n\n1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n2. In the list of environments, locate your environment.\n\n3. in the **Logs** column, click the **Logs** link.\n\nView Airflow task logs in the environment's bucket **Note:** You can view Airflow task logs [in the Airflow UI](/composer/docs/composer-1/access-airflow-web-interface).\n\nTo view Airflow task logs in your environment's bucket: \n\nConsole\n\n1. In Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n2. In the list of environments, find a row with the name of your environment\n and in the **DAGs folder** column click the **DAGs** link. The\n **Bucket details** page opens.\n\n3. In the **Folder browser** pane, click `/logs`.\n\n | **Note:** If this folder is empty, then [saving logs to the environment's bucket](/composer/docs/composer-2/enable-saving-logs-to-environment-bucket) might be disabled for your environment.\n\nWhat's next\n\n- [Monitor environments](/composer/docs/composer-1/monitor-environments)\n- [Cloud Composer audit logging](/composer/docs/composer-1/audit-logging)"]]