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


##########
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:
   Yeah. I also feel quite uncomfortable with setting something that looks like 
CONSTANT from outside of the modul. having a clean method API seems way better 
from the API point of view
   
   Maybe it's just me - but it reminds me the old days of Python 2
   
   ```
   True=False
   ```
   



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