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/07/21 01:45:46 UTC

[GitHub] [airflow] dave-martinez commented on issue #17077: Problem with task_run and secrets mask

dave-martinez commented on issue #17077:
URL: https://github.com/apache/airflow/issues/17077#issuecomment-883820931


   Encountered the same issue, and was able to fix it with @potiuk explanation. Sharing my experience for people who use custom logging.
   
   SecretsMasker is now needed for loggers in Airflow 2.0 configuration. As @potiuk referenced, it is suggested to do a deep copy of the default logging config before modifying it.
   
   For those with an already existing logger, reference this config template. Pay attention to filters and mask secrets.
   
   
   https://github.com/apache/airflow/blob/main/airflow/config_templates/airflow_local_settings.py
   
   
   ```
   # Add it to LOGGING_CONFIG
   
   {
     ...
     'filters': {
          'mask_secrets': {
              '()': 'airflow.utils.log.secrets_masker.SecretsMasker',
          },
     },
   }
   
   # Add this to handlers and airflow.task logger
   
   {
     ...
     'filters': ['mask_secrets']
   }
   ```
   
   
   
   


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