public class Sanitizer
extends java.lang.Object
Sanitizer replace values of secret properties with asterisks.
Logic partially borrowed from Spring Actuator. See org.springframework.boot.actuate.endpoint.Sanitizer class.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SANITIZE_STRING |
| Constructor and Description |
|---|
Sanitizer() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
sanitize(java.lang.String key,
java.lang.Object value)
Sanitize the given value if necessary.
|
void |
setKeysToSanitize(java.lang.String... keysToSanitize)
Keys that should be sanitized.
|
public static final java.lang.String SANITIZE_STRING
public void setKeysToSanitize(java.lang.String... keysToSanitize)
keysToSanitize - the keys to sanitizepublic java.lang.Object sanitize(java.lang.String key,
java.lang.Object value)
key - the key to sanitizevalue - the value