sshah90 commented on a change in pull request #12925:
URL: https://github.com/apache/airflow/pull/12925#discussion_r588455010



##########
File path: docs/apache-airflow-providers-grafana/logging.rst
##########
@@ -0,0 +1,50 @@
+ .. 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.
+
+.. _write-logs-loki:
+
+Writing Logs to Grafana Loki
+----------------------------------
+
+Airflow can be configured to read and write task logs in `Grafana Loki 
<https://github.com/grafana/loki/>`__.
+It uses an existing Airflow connection to read or write logs. If you don't 
have a connection properly setup,
+this process will fail.
+
+To enable this feature, ``airflow.cfg`` must be configured as in this
+
+.. code-block:: ini
+
+    [logging]
+    # Airflow can store logs remotely in AWS S3, Google Cloud Storage, Elastic 
Search or Loki.
+    # Users must supply an Airflow connection id that provides access to the 
storage
+    # location. If remote_logging is set to true, see UPDATING.md for 
additional
+    # configuration requirements.
+    remote_logging = True
+    remote_base_log_folder = 'loki:///airflow'
+    remote_log_conn_id = <name of the Loki connection>
+
+All configuration options are in the ``[logging]`` section.
+
+The value of field ``remote_logging`` must always be set to ``True`` for this 
feature to work.
+Turning this option off will result in data not being sent to Loki.

Review comment:
       Hi @RosterIn 
   
   In my local static check never failed but I added it just in case.
   
   Thanks for the suggestion.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to