Apache Airflow Logging Guide

Overview

Apache Airflow 2.8.1 generates logs for various components such as the Scheduler, Webserver, and Worker processes. These logs are essential for debugging and monitoring the system.

Log Storage Location

The Airflow logs are stored under the following directory:

Bash
Copy

To list the logs available, use:

Bash
Copy

This directory contains logs for various DAGs, the scheduler, and the webserver.

Scheduler Logs

The Airflow scheduler logs can be found in:

Bash
Copy

The logs are organized by date, with the latest logs available under:

Bash
Copy

To inspect a specific log file, navigate to the corresponding date:

Bash
Copy

Example output:

Bash
Copy

Webserver Logs

The Airflow webserver logs can be found in:

Bash
Copy

To check the last 100 lines of the webserver logs, use:

Bash
Copy

For errors, check:

Bash
Copy

DAG Logs

Each DAG execution logs its runs under:

Bash
Copy

Example:

Bash
Copy

Output:

Bash
Copy

To view the logs of a task attempt:

Bash
Copy

Debugging with Systemd

Since Airflow components are managed using systemd, you can check the status and logs using:

Webserver

Check the webserver status:

Bash
Copy

View the last 100 logs:

Bash
Copy

Scheduler

Check the scheduler status:

Bash
Copy

View the last 100 logs:

Bash
Copy

Worker (if applicable)

If using Celery workers, check their status:

Bash
Copy

View the last 100 logs:

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated