Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Default Logging in Apache Airflow
=================================

Apache Airflow has multiple loggers for different components, which can be confusing for new users.
This section explains the default loggers, their purposes, and how to modify their behavior.

Default Loggers
---------------

+------------------------+----------------+----------------------------+--------------------------------+
| Logger Name | Component | Output | Notes |
+========================+================+============================+================================+
| root | Webserver | stdout / webserver log | Default root logger used by webserver. |
+------------------------+----------------+----------------------------+--------------------------------+
| airflow.task | Scheduler/Worker | logs/<dag_id>/<task_id>/<execution_date>/<try_number>.log | A new log file is created per task instance and try. Shown in the Web UI. |
+------------------------+----------------+----------------------------+--------------------------------+
| airflow.processor | Scheduler/Worker | logs/<dag_file_name>.log | Logs DAG parsing for scheduler and workers. |
+------------------------+----------------+----------------------------+--------------------------------+
| airflow.processor_manager | Scheduler | logs/<dag_file_name>.log | Logs task instance execution control. |
+------------------------+----------------+----------------------------+--------------------------------+
| flask_appbuilder | Webserver | filters verbose FAB logs | Typically used for filtering; no config needed by most users. |
+------------------------+----------------+----------------------------+--------------------------------+

Logging by Airflow Component
----------------------------

- **Webserver**: Uses the root logger. Logs to stdout and webserver log file.
- **Worker**: Uses `airflow.task` and `airflow.processor`. Task logs are stored per task instance. DAG parsing logs are stored per DAG file.
- **Scheduler**: Uses `airflow.processor`, `airflow.processor_manager`, and the root logger.

Customizing Logging
-------------------

You can influence the logging configuration using the following methods:

1. **Configuration via airflow.cfg**
- `[logging]` section allows changing:
- Base log folder (`base_log_folder`)
- Remote logging settings
- Logging format

2. **Custom Python logging configuration**
- Airflow uses `airflow.utils.log.logging_config.py`
- You can override `LOGGING_CONFIG` in `airflow_local_settings.py`
- Example:

.. code-block:: python
from airflow.utils.log.logging_config import DEFAULT_LOGGING_CONFIG
LOGGING_CONFIG = DEFAULT_LOGGING_CONFIG.copy()
LOGGING_CONFIG['handlers']['console']['level'] = 'INFO'
3. **Environment Variables**
- Some logging options can be set via environment variables, e.g.:
- `AIRFLOW__LOGGING__BASE_LOG_FOLDER`
- `AIRFLOW__LOGGING__REMOTE_LOGGING`

Recommendations
---------------

- Use `airflow.task` logs to debug task failures.
- Use `airflow.processor` to debug DAG parsing issues.
- For production, consider remote logging (S3, GCS, Elasticsearch) for scalability.
- Do **not** modify `flask_appbuilder` logger unless needed.

References
----------

- :doc:`/configuration/logging`
- :ref:`task-logs`
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@
import { createSkeletonMock } from "src/components/DataTable/skeleton";
import type { CardDef, MetaColumn, TableState } from "src/components/DataTable/types";
import { ProgressBar, Pagination, Toaster } from "src/components/ui";

const loadFromStorage = <T,>(key: string, fallback: T): T => {
try {
const raw = localStorage.getItem(key);
return raw ? JSON.parse(raw) : fallback;
} catch {
return fallback;
}
};
type DataTableProps<TData> = {
readonly allowFiltering?: boolean;
readonly cardDef?: CardDef<TData>;
Expand Down Expand Up @@ -83,6 +90,7 @@
skeletonCount = 10,
total = 0,
}: DataTableProps<TData>) => {
const storageKey = `airflow.datatable.${modelName}`;
"use no memo"; // remove if https://github.com/TanStack/table/issues/5567 is resolved

const { t: translate } = useTranslation(["common"]);
Expand All @@ -109,9 +117,21 @@
[onStateChange],
);

const [columnVisibility, setColumnVisibility] = useState<VisibilityState>(
const [columnVisibility, setColumnVisibility] = useState<VisibilityState>(() =>
loadFromStorage(
`${storageKey}.columnVisibility`,
initialState?.columnVisibility ?? {},
),
);

useEffect(() => {

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > does not render row count heading when showRowCountHeading is false

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > renders row count heading by default when total > 0

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > displays skeleton for loading card list

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > displays cards if mode is card and there is cardDef

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > still displays table if mode is card but there is no cardDef

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > when isLoading renders skeleton columns

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > renders no pagination when not needed

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > disables next button when on last page

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > disables previous page button on first page

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

Check failure on line 127 in airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx

View workflow job for this annotation

GitHub Actions / Basic tests / React UI tests

src/components/DataTable/DataTable.test.tsx > DataTable > renders table with data

ReferenceError: useEffect is not defined ❯ DataTable src/components/DataTable/DataTable.tsx:127:3 ❯ Object.react_stack_bottom_frame node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:25904:20 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:7662:22 ❯ updateFunctionComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10166:19 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:11778:18 ❯ runWithFiberInDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:874:13 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17641:22 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17469:41 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ❯ performWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:16583:35

localStorage.setItem(
`${storageKey}.columnVisibility`,
JSON.stringify(columnVisibility),
);
}, [columnVisibility, storageKey]);


const rest = Boolean(isLoading) ? createSkeletonMock(displayMode, skeletonCount, columns) : {};

Expand Down
Loading