Class LogRedactor


  • public class LogRedactor
    extends Object
    • Method Detail

      • redactSensitiveValues

        public static Properties redactSensitiveValues​(Map<?,​?> properties)
        Redacts all values which ends with "password" from the given properties / map. Other values are not changed.
        Parameters:
        properties - the properties in which all passwords should be redacted.
        Returns:
        new Properties object containing all values, passwords redacted.
      • redactValue

        public static String redactValue​(String key,
                                         String value)
        Returns redacted value when the key ends with "password". Otherwise, just returns the value.
        Parameters:
        key - the key to check if it ends with "password".
        Returns:
        redacted value when the key ends with "password". Otherwise, the value.