amoghrajesh commented on code in PR #54449:
URL: https://github.com/apache/airflow/pull/54449#discussion_r2293176703


##########
shared/secrets_masker/src/airflow_shared/secrets_masker/secrets_masker.py:
##########
@@ -234,6 +232,21 @@ def _redact(*args, replacement: str = "***", **kwargs):
                 cls._redact = _redact
                 ...
 
+    @classmethod
+    def enable_log_masking(cls) -> None:
+        """Enable secret masking in logs."""
+        cls._mask_secrets_in_logs = True
+
+    @classmethod
+    def disable_log_masking(cls) -> None:
+        """Disable secret masking in logs."""
+        cls._mask_secrets_in_logs = False

Review Comment:
   Yes, wanted to move the MASK_SECRETS_IN_LOGS out of settings for the very 
reason because it ideally should belong in secrets masker and also the other 
reason being -- we want to isolate the `secrets_masker` as a shared package and 
keeping that variable in settings would require importing settings as it is 
done today (before this PR)



-- 
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: [email protected]

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

Reply via email to