Package org.forgerock.config.resolvers
Class Logs
java.lang.Object
org.forgerock.config.resolvers.Logs
Helper class for logging securely sensitive values.
-
Method Summary
Modifier and TypeMethodDescriptionlogResolution
(Logger logger, PropertyResolver resolver, String key, boolean sensitive) Securely logs resolved value on the givenlogger
.
-
Method Details
-
logResolution
public static Consumer<String> logResolution(Logger logger, PropertyResolver resolver, String key, boolean sensitive) Securely logs resolved value on the givenlogger
. Ifsensitive
is true, a original value's hashcode is printed, otherwise the real value is printed.Example usage:
value.ifPresent(logResolution(logger, this, key, sensitive));
- Parameters:
logger
- Logger to useresolver
- property resolver that has performed the resolutionkey
- Name of the property.sensitive
- Should the value be masked or not- Returns:
- a function to be used in Optional.ifPresent(Consumer)
- See Also:
-