You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/23 09:53:20 UTC

[GitHub] [airflow] hsnprsd edited a comment on issue #16001: Can't view running tasks logs using KubernetesExecutor.

hsnprsd edited a comment on issue #16001:
URL: https://github.com/apache/airflow/issues/16001#issuecomment-846535185


   I came up with a solution today.
   I changed the default logging config class like this:
   
   ```
   import sys
   from copy import deepcopy
   
   from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG
   
   LOGGING_CONFIG = deepcopy(DEFAULT_LOGGING_CONFIG)
   
   LOGGING_CONFIG["handlers"]["custom_console"] = {
       "class": "logging.StreamHandler",
       "formatter": "airflow",
       "stream": sys.__stdout__,
   }
   LOGGING_CONFIG["loggers"]["airflow.task"]["handlers"].append("custom_console")
   ```
   
   I moved this file to $AIRFLOW_HOME/config/logging_config.py and changed `AIRFLOW__LOGGING__LOGGING_CONFIG_CLASS` to `logging_config.LOGGING_CONFIG`


-- 
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:
users@infra.apache.org