You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "subhash-0000 (via GitHub)" <gi...@apache.org> on 2026/01/30 12:19:36 UTC

[PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

subhash-0000 opened a new pull request, #61257:
URL: https://github.com/apache/airflow/pull/61257

   Clarify logging configuration for Airflow 3.x by removing legacy
   DEFAULT_LOGGING_CONFIG examples and documenting structlog-based JSON
   console logging.
   
   This updates the advanced logging documentation to reflect the Airflow 3.x
   structlog migration and provides a future-proof way to enable JSON logs.
   
   closes: #61175
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (Gemini 3 Flash)
   
   Generated-by: Gemini 3 Flash following the guidelines
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #61257:
URL: https://github.com/apache/airflow/pull/61257#issuecomment-3921444985

   Actually this one looks like entirely untested and hallucinated change - and since there is no response from the author we close it. 
   
   Also @subhash-0000 - please follow our guidelines when implementing future changes https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "soenkeliebau (via GitHub)" <gi...@apache.org>.
soenkeliebau commented on PR #61257:
URL: https://github.com/apache/airflow/pull/61257#issuecomment-3870118397

   Just to clarify, we are absolutely not tracking this as the expected fix for this issue. We never tested it, but have the suspicion, that what is documented here won't have any effect when tried.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "subhash-0000 (via GitHub)" <gi...@apache.org>.
subhash-0000 commented on PR #61257:
URL: https://github.com/apache/airflow/pull/61257#issuecomment-3851383254

   Hi @eladkal, just a gentle follow-up on this. All checks are passing, and I've addressed the previous feedback by removing the migration notes and the invalid config parameter. I noticed this is also being referenced by other community members, so I'm ready to finalize this whenever you have a moment. Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "DartVeDroid (via GitHub)" <gi...@apache.org>.
DartVeDroid commented on PR #61257:
URL: https://github.com/apache/airflow/pull/61257#issuecomment-3833665229

   There is no config parameter `AIRFLOW__LOGGING__JSON_FORMAT`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #61257:
URL: https://github.com/apache/airflow/pull/61257#discussion_r2753184632


##########
airflow-core/docs/administration-and-deployment/logging-monitoring/advanced-logging-configuration.rst:
##########
@@ -49,50 +49,64 @@ You can read more about standard python logging classes (Loggers, Handlers, Form
 Create a custom logging class
 -----------------------------
 
-Configuring your logging classes can be done via the ``logging_config_class`` option in ``airflow.cfg`` file.
-This configuration should specify the import path to a configuration compatible with
-:func:`logging.config.dictConfig`. If your file is a standard import location, then you should set a
-:envvar:`PYTHONPATH` environment variable.
 
-Follow the steps below to enable custom logging config class:
+.. important::
 
-#. Start by setting environment variable to known directory e.g. ``~/airflow/``
+   **Migration Note: Logging in Airflow 3.x and Later**

Review Comment:
   Migration from 2 to 3 notes should be only in
   
   https://airflow.apache.org/docs/apache-airflow/stable/installation/upgrading_to_airflow3.html#upgrading-to-airflow-3
   
   
   The `airflow-core/docs/administration-and-deployment/logging-monitoring/advanced-logging-configuration.rst` doc should explain how advanced logging should be set. It should not consider 2->3 steps. It should assume you are starting fresh directly on Airflow 3.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "subhash-0000 (via GitHub)" <gi...@apache.org>.
subhash-0000 commented on code in PR #61257:
URL: https://github.com/apache/airflow/pull/61257#discussion_r2753375795


##########
airflow-core/docs/administration-and-deployment/logging-monitoring/advanced-logging-configuration.rst:
##########
@@ -49,50 +49,64 @@ You can read more about standard python logging classes (Loggers, Handlers, Form
 Create a custom logging class
 -----------------------------
 
-Configuring your logging classes can be done via the ``logging_config_class`` option in ``airflow.cfg`` file.
-This configuration should specify the import path to a configuration compatible with
-:func:`logging.config.dictConfig`. If your file is a standard import location, then you should set a
-:envvar:`PYTHONPATH` environment variable.
 
-Follow the steps below to enable custom logging config class:
+.. important::
 
-#. Start by setting environment variable to known directory e.g. ``~/airflow/``
+   **Migration Note: Logging in Airflow 3.x and Later**

Review Comment:
   Thanks for the clarification
   I’ve removed the Airflow 2 → 3 migration note from advanced-logging-configuration.rst so the document now assumes a fresh Airflow 3 setup.
   Migration-related guidance is kept only in the official upgrade documentation as suggested



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "subhash-0000 (via GitHub)" <gi...@apache.org>.
subhash-0000 commented on PR #61257:
URL: https://github.com/apache/airflow/pull/61257#issuecomment-3833968071

   @DartVeDroid 
   Thanks for pointing this out  AIRFLOW__LOGGING__JSON_FORMAT is not a valid Airflow config parameter.
   I’ve removed the reference to it and updated the documentation to rely solely on a custom LOGGING_CONFIG via logging_config_class, which is the supported approach in Airflow 3.
   
   Please let me know if the updated wording looks correct


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "siegfriedweber (via GitHub)" <gi...@apache.org>.
siegfriedweber commented on PR #61257:
URL: https://github.com/apache/airflow/pull/61257#issuecomment-3920391729

   I followed the instructions in the "Configuring JSON Console Logging" section of the adapted documentation, but unfortunately, I didn't see any changes in the log output with Airflow 3.1.6. It seems that the configuration might be ignored, as described in the [Airflow source code](https://github.com/apache/airflow/blob/3.1.7/shared/logging/src/airflow_shared/logging/structlog.py#L516). Could you share how you tested this feature?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed pull request #61257: docs(logging): clarify structlog usage and JSON console logging in Ai…
URL: https://github.com/apache/airflow/pull/61257


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs(logging): clarify structlog usage and JSON console logging in Ai… [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #61257:
URL: https://github.com/apache/airflow/pull/61257#discussion_r2753184632


##########
airflow-core/docs/administration-and-deployment/logging-monitoring/advanced-logging-configuration.rst:
##########
@@ -49,50 +49,64 @@ You can read more about standard python logging classes (Loggers, Handlers, Form
 Create a custom logging class
 -----------------------------
 
-Configuring your logging classes can be done via the ``logging_config_class`` option in ``airflow.cfg`` file.
-This configuration should specify the import path to a configuration compatible with
-:func:`logging.config.dictConfig`. If your file is a standard import location, then you should set a
-:envvar:`PYTHONPATH` environment variable.
 
-Follow the steps below to enable custom logging config class:
+.. important::
 
-#. Start by setting environment variable to known directory e.g. ``~/airflow/``
+   **Migration Note: Logging in Airflow 3.x and Later**

Review Comment:
   Migration from 2 to 3 notes should be only in
   
   https://airflow.apache.org/docs/apache-airflow/stable/installation/upgrading_to_airflow3.html#upgrading-to-airflow-3
   
   
   The airflow-core/docs/administration-and-deployment/logging-monitoring/advanced-logging-configuration.rst doc should explain how advanced logging should be set. It should not consider 2->3 steps. It should assume you are starting fresh directly on Airflow 3.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org