diff --git a/core/src/main/java/io/jstach/rainbowgum/LogEncoder.java b/core/src/main/java/io/jstach/rainbowgum/LogEncoder.java index 8bf4c254..75a754f4 100644 --- a/core/src/main/java/io/jstach/rainbowgum/LogEncoder.java +++ b/core/src/main/java/io/jstach/rainbowgum/LogEncoder.java @@ -80,7 +80,6 @@ public interface EncoderProvider { * @param name name of encoder. * @param properties key value config. * @return output. - * @see LogProperties#of(URI) */ LogEncoder provide(URI uri, String name, LogProperties properties); diff --git a/core/src/main/java/io/jstach/rainbowgum/LogOutput.java b/core/src/main/java/io/jstach/rainbowgum/LogOutput.java index ed488b56..c314e46b 100644 --- a/core/src/main/java/io/jstach/rainbowgum/LogOutput.java +++ b/core/src/main/java/io/jstach/rainbowgum/LogOutput.java @@ -86,7 +86,6 @@ public interface OutputProvider { * @param properties key value config. * @return output. * @throws IOException if unable to use the URI. - * @see LogProperties#of(URI) */ LogOutput output(URI uri, String name, LogProperties properties) throws IOException; diff --git a/core/src/main/java/io/jstach/rainbowgum/LogProperties.java b/core/src/main/java/io/jstach/rainbowgum/LogProperties.java index c89a365e..96600790 100644 --- a/core/src/main/java/io/jstach/rainbowgum/LogProperties.java +++ b/core/src/main/java/io/jstach/rainbowgum/LogProperties.java @@ -233,6 +233,16 @@ public Builder order(int order) { return this; } + /** + * Sets what is called on {@link LogProperties#valueOrNull(String)}. + * @param function valueOrNull func. + * @return this. + */ + public Builder function(Function function) { + this.function = function; + return this; + } + /** * Parses a string as {@link Properties}. * @param properties properties as a string. @@ -341,26 +351,6 @@ public static LogProperties of(List logProperties) { return of(logProperties, StandardProperties.EMPTY); } - /** - * Creates log properties from a {@linkplain URI#getQuery() URI query} in - * application/x-www-form-urlencoded format useful for parsing {@link LogOutput} - * configuration. This parser unlike form encoding uses %20 for - * space as the data is coming from a URI. - * @param uri uri to get query from. - * @return properties - * @see LogOutput - */ - public static LogProperties of(URI uri) { - Map m = new LinkedHashMap<>(); - parseUriQuery(uri.getRawQuery(), (k, v) -> { - if (v != null) { - m.put(k, v); - } - }); - return new MapProperties(uri.toString(), m); - } - /** * Parse a {@linkplain URI#getRawQuery() URI query} in diff --git a/todo.md b/todo.md index 50dde7bd..c95b2e0b 100644 --- a/todo.md +++ b/todo.md @@ -11,7 +11,6 @@ logical resource (it might not be a single physical resource particularly in the # Features in limbo -* Level changing loggers - medium * Filters - medium * Markers - We might use this for some other kind of features * Key values that are not MDC aka new slf4j event builder @@ -24,10 +23,16 @@ logical resource (it might not be a single physical resource particularly in the ## TODO before release -- [ ] A network based LogOutput. Probably AMQP. -- [ ] A console theme. +- [ ] Level changing loggers - medium +- [X] A network based LogOutput. Probably AMQP. +- [ ] More JSON encoders. +- [ ] A console theme package based off of HL (logging colorizer). - [ ] Remove all the field based formatters. - [ ] Code samples and instructions for custom configuration. +- [ ] How to setup a ServiceLoader registration for plugins - [ ] Scoped Value plugin - [ ] JEP 430 String templates example +- [ ] Check performance again +- [ ] Remove bloat / unused code +- [ ] Check performance again