You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Adaverse (via GitHub)" <gi...@apache.org> on 2023/06/26 09:57:45 UTC

[GitHub] [airflow] Adaverse commented on a diff in pull request #32131: Separate out advanced logging configuration

Adaverse commented on code in PR #32131:
URL: https://github.com/apache/airflow/pull/32131#discussion_r1241935768


##########
docs/apache-airflow/administration-and-deployment/logging-monitoring/advanced-logging-configuration.rst:
##########
@@ -0,0 +1,79 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+Advanced logging configuration
+------------------------------
+
+Not all configuration options are available from the ``airflow.cfg`` file. The config file describes
+how to configure logging for tasks, because the logs generated by tasks are not only logged in separate
+files by default but has to be also accessible via the webserver.
+
+By default standard airflow component logs are written to the ``$AIRFLOW_HOME/logs`` directory, but you
+can also customize it and configure it as you want by overriding Python logger configuration that can
+be configured by providing custom logging configuration object. Some configuration options require
+that the logging config class be overwritten. You can do it by copying the default
+configuration of Airflow and modifying it to suit your needs. The default configuration can be seen in the
+`airflow_local_settings.py template <https://github.com/apache/airflow/blob/|airflow_version|/airflow/config_templates/airflow_local_settings.py>`_
+and you can see the loggers and handlers used there. Except the custom loggers and handlers configurable there
+via the ``airflow.cfg``, the logging methods in Airflow follow the usual Python logging convention,
+that Python objects log to loggers that follow naming convention of ``<package>.<module_name>``.
+
+You can read more about standard python logging classes (Loggers, Handlers, Formatters) in the
+`Python logging documentation <https://docs.python.org/3/library/logging.html>`_.

Review Comment:
   ```suggestion
   `Python logging documentation <https://docs.python.org/library/logging.html>`_.
   ```
   We can remove the specific version since it auto redirects to stable release. 



-- 
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