Class LogProperties.Builder
java.lang.Object
io.jstach.rainbowgum.LogProperties.AbstractBuilder<LogProperties.Builder>
io.jstach.rainbowgum.LogProperties.Builder
- Enclosing interface:
LogProperties
public static final class LogProperties.Builder
extends LogProperties.AbstractBuilder<LogProperties.Builder>
Builder for properties.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds LogProperties based on builder config.fromFunction(Function<String, @Nullable String> function) Sets what is called onLogProperties.valueOrNull(String).fromProperties(String properties) Parses a string asProperties.fromURIQuery(URI uri) Parses a string as a URI query string.Methods inherited from class LogProperties.AbstractBuilder
description, order, removeKeyPrefix, renameKey, withModifier and TypeMethodDescriptiondescription(String description) Description for properties.order(int order) When log properties are coalesced this method is used to resolve order.removeKeyPrefix(String prefix) Removes the prefix from a key before it accesses the underlying properties.Renames the key before it accesses function.with(LogProperties properties) Add a fallback properties.
-
Method Details
-
fromFunction
Sets what is called onLogProperties.valueOrNull(String).- Parameters:
function- valueOrNull func.- Returns:
- this.
-
fromProperties
Parses a string asProperties.- Parameters:
properties- properties as a string.- Returns:
- this.
-
fromURIQuery
Parses a string as a URI query string. If the URI has no query portion then it will be equivalent to empty properties.- Parameters:
uri- percent encoded uri with separator as "&" and key value separator of "=".- Returns:
- this.
-
build
-