java.lang.Object
io.jstach.rainbowgum.LevelResolver.AbstractBuilder<LogRouter.Router.Builder>
io.jstach.rainbowgum.LogRouter.Router.Builder
- All Implemented Interfaces:
LogConfig.ConfigSupport
,LogProperty.PropertySupport
- Enclosing interface:
LogRouter.Router
public static final class LogRouter.Router.Builder
extends LevelResolver.AbstractBuilder<LogRouter.Router.Builder>
implements LogConfig.ConfigSupport
Router builder.
-
Method Summary
Modifier and TypeMethodDescriptionappender
(LogProvider<LogAppender> appender) Adds an appender.appender
(String name, Consumer<LogAppender.Builder> consumer) Adds an appender by giving an appender builder to a consumer.config()
Gets the currently bound config.factory
(LogRouter.Router.RouterFactory factory) Factory to use for creating the router.flag
(LogRouter.RouteFlag flag) Adds a flag.publisher
(LogPublisher.PublisherFactory publisher) Sets the publisher.Methods inherited from class io.jstach.rainbowgum.LevelResolver.AbstractBuilder
config, config, level, level
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jstach.rainbowgum.LogConfig.ConfigSupport
properties
Methods inherited from interface io.jstach.rainbowgum.LogProperty.PropertySupport
value
-
Method Details
-
config
Gets the currently bound config.- Specified by:
config
in interfaceLogConfig.ConfigSupport
- Returns:
- config.
-
flag
Adds a flag.- Parameters:
flag
- flag added if not already added.- Returns:
- this.
-
appender
Adds an appender by giving an appender builder to a consumer.- Parameters:
name
- appender name.consumer
- consumer.- Returns:
- this builder.
-
appender
Adds an appender.- Parameters:
appender
- appender provider.- Returns:
- this builder.
-
publisher
Sets the publisher. Only one publisher to router.- Parameters:
publisher
- publisher.- Returns:
- this builder.
-
factory
Factory to use for creating the router.- Parameters:
factory
- router factory.- Returns:
- this.
-