View task and Airflow component logs to troubleshoot your data pipelines and better understand the health of both your tasks and their execution environment.
Airflow has two different log types:
You can retrieve Deployment logs programmatically with the Get Deployment logs endpoint in the Astro API. The endpoint supports filtering by log source (scheduler, triggerer, worker, webserver, dag-processor, or apiserver), time range, and free-text search, which makes it useful for building custom log workflows or integrations.
Task logs can additionally be exported to third-party observability platforms. See:
Airflow has four core components: the scheduler, triggerer, worker, and webserver/API server. Each component records its process in component logs. These logs can be used to monitor overall performance, troubleshoot errors, and optimize resources.
Dag processor logs describe the performance of the Dag processor, a sub-component of the Scheduler. The Dag processor is responsible for parsing dags and turning them into dag objects that contain tasks to be scheduled. These logs can help you understand both the Dag processor and scheduler performance. Dag processor logs are not available for Small Deployments because the Dag processor and scheduler run on the same host. For more information on configuring the scheduler on Astro, see Scheduler resources.
Scheduler logs describe the performance of the scheduler, which is responsible for scheduling and queueing task runs. These logs can help you understand scheduler performance and indicate if a task failed due to an issue with the scheduler. For more information on configuring the scheduler on Astro, see Scheduler resources.
Triggerer logs describe the performance of the triggerer, the Airflow component responsible for running triggers and signaling tasks to resume when their conditions have been met. The triggerer is used exclusively for tasks that are run with deferrable operators.
Worker logs are generated by Celery Workers and can help you monitor task execution to optimize performance. This type of log is not available when using the Kubernetes Exeuctor.
Webserver logs relate to the health and performance of the Airflow UI. If the Airflow UI at any point does not load, for example, webserver/API server logs might indicate why.
Logs and messages might also be associated with one of the following log levels:
DeprecationWarning. For example, Airflow might recommend that you upgrade your Deployment if there was a change to the Airflow database or task execution logic.You can access scheduler, triggerer, and task logs in the Astro UI to find the past 24 hours of logs for any Deployment on its Logs page.
In the Astro UI, select a Workspace and then a Deployment.
Click the Logs tab.
The maximum number of lines returned is 10,000, with 50 results displayed per page. If there are no logs available for a given Deployment, the following message appears:
Typically, this indicates that the Deployment you selected does not currently have any dags running.
You can use the following options to specify the types of logs or messages that you want to view.
String search: Enter a string, keyword, or phrase to find in your logs. You can also search with suffix wildcards by adding a * to your search query. For example, acti* returns results that include action and acting. The string search does not include fuzzy matching, so misspelled strings or incomplete strings without a wildcard, *, return zero results.
Time range: Filter the logs displayed based on time.
Log type: Filter based on whether the log message is from a Dag Processor, Scheduler, Worker, Webserver/API Server, or Triggerer.
To show logs for your Airflow scheduler, webserver, or triggerer locally, run the following Astro CLI command:
After you run this command, the most recent logs for these components appear in your terminal window.
By default, running astro dev logs shows logs for all Airflow components. To see logs only for a specific component, add any of the following flags to your command:
--scheduler--webserver--triggererTo continue monitoring logs, run astro dev logs --follow. The --follow flag ensures that the latest logs continue to appear in your terminal window. For more information about this command, see CLI Command Reference.
Airflow task logs can help you troubleshoot a specific task instance that failed or retried. Based on your preference, you can choose to use to access task logs in the Astro UI or the Airflow UI. Both provide filters, search, and download options for task logs and share other information about your dag performance on the same page.
Task logs for Astro Deployments are retained for 90 days. The task log retention policy is not currently configurable.
You can also access local Airflow task logs in your local Airflow UI or printed to the terminal.
Similar to the Airflow component log levels, task logs might also be associated with one of the following log levels, that you can search or filter with:
http://localhost:8080.