Class RedactionProcessor.Builder
java.lang.Object
codes.grow.packages.betterstack.logging.RedactionProcessor.Builder
- Enclosing class:
RedactionProcessor
Builder for
RedactionProcessor.-
Method Summary
Modifier and TypeMethodDescriptionAdds key fragments to the current list.build()Builds the processor.keys(Collection<String> keys) Replaces the sensitive key fragments.Adds a pattern applied to the body and string attribute values.replacement(String replacement) Sets the replacement text.
-
Method Details
-
keys
Replaces the sensitive key fragments.- Parameters:
keys- key fragments (matched case-insensitively as substrings)- Returns:
- this builder
-
addKeys
Adds key fragments to the current list.- Parameters:
extra- additional key fragments- Returns:
- this builder
-
pattern
Adds a pattern applied to the body and string attribute values.- Parameters:
pattern- regular expression- Returns:
- this builder
-
replacement
Sets the replacement text.- Parameters:
replacement- replacement (default"[REDACTED]")- Returns:
- this builder
-
build
Builds the processor.- Returns:
- processor
-