How to Read a Task Log in the Apache Airflow® UI
Everything an Apache Airflow® task writes, through Python's logging or with a plain print(), ends up in that task's log. In the Airflow 3 UI, the log has numbered lines, collapsible groups and a filter by level. This guide opens one, finds a print() line that isn't where you'd expect it, and filters the log down to warnings, on Airflow 3.4.0.
Prerequisites
- Apache Airflow® running, and a Dag that has run at least once.
The Example Task
This guide reads the log of a small Dag whose only task logs two lines and prints one:
import logging
from airflow.sdk import dag, task
log = logging.getLogger(__name__)
@dag(schedule=None, tags=["demo"])
def hello_logs():
@task
def count_files():
log.info("Counting the files in the inbox")
log.warning("The inbox has more than 100 files")
print("Done counting")
count_files()
hello_logs()

Step 1: Open the Log
Open the Dag, click the run's square for the task in the grid on the left, and stay on the Logs tab:

Each line has a number, a timestamp, a level and the message:
| Line | Where it came from |
|---|---|
INFO - Counting the files in the inbox | log.info(...) in the task |
WARNING - The inbox has more than 100 files | log.warning(...), highlighted in yellow |
INFO - Done. Returned value was: None | Airflow itself, after the task's function returned |
The rows starting with ▶ are collapsed groups that Airflow adds around your task's own lines; click a group's name to expand it. The numbering starts at 4 here because lines 1 to 3 are inside the collapsed groups.
Step 2: Find the print() Output
The Done counting line from print() isn't between the others. Click Post Execute at the bottom:

There it is, as line 7, after Airflow's Done. line, and shown at the INFO level. Airflow collects what a task prints separately from its log calls, and in my run those lines arrived after the task had finished, so the UI grouped them under Post Execute. If a print() seems to be missing, look there.
Step 3: Filter by Level
Click All Log Levels:

Pick WARNING, then press Escape to close the menu:

Only the warning is left. In a long log, this is the quickest way to find what went wrong. The × in the filter box removes the filter again.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Looking for print() lines between the log lines | They're not there | Expand Post Execute |
Expecting a print() line to show up under a WARNING filter | Printed lines are shown as INFO | Use log.warning(...) for warnings |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Your print() line is missing | It's inside the collapsed Post Execute group | Expand it |
FAQ
Should I use print() or logging in a task?
Both end up in the log, but a print() line is always shown as INFO. With logging you choose the level, such as WARNING, which is what the level filter goes by.
Where are the log files on disk?
In the logs folder of your AIRFLOW_HOME. This one is logs/dag_id=hello_logs/run_id=manual__2026-12-01T04:30:00.712410+00:00/task_id=count_files/attempt=1.log: a folder per Dag, run and task, and a file per attempt.
Conclusion
The count_files log showed its INFO and WARNING lines in order, numbered, with Airflow's own Done. line after them. The print() line was in the collapsed Post Execute group, and the WARNING filter cut the log down to the one warning.
Additional Resources
- Logging for tasks — how Airflow writes and serves task logs.
- UI overview — the pages of the Airflow UI.
Apache®, Apache Airflow and Airflow® are either registered trademarks or trademarks of The Apache Software Foundation in the United States and/or other countries. No endorsement by The Apache Software Foundation is implied by the use of these marks.
