Module io.jstach.rainbowgum
Package io.jstach.rainbowgum.spi
Interface RainbowGumServiceProvider.RainbowGumProvider
- All Superinterfaces:
RainbowGumServiceProvider
- Enclosing interface:
RainbowGumServiceProvider
public static non-sealed interface RainbowGumServiceProvider.RainbowGumProvider
extends RainbowGumServiceProvider
Implement to create a custom RainbowGum. This is the preferred way to customize
RainbowGum publishers, appenders, and outputs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jstach.rainbowgum.spi.RainbowGumServiceProvider
RainbowGumServiceProvider.Configurator, RainbowGumServiceProvider.Pass, RainbowGumServiceProvider.PropertiesProvider, RainbowGumServiceProvider.RainbowGumProvider
-
Field Summary
Fields inherited from interface io.jstach.rainbowgum.spi.RainbowGumServiceProvider
PASSES
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
priority()
If there are multiple rainbow gum providers found the higher priority ones are tried first (provide(LogConfig)
).Optionally provides a rainbow gum based on config.
-
Method Details
-
provide
Optionally provides a rainbow gum based on config.- Parameters:
config
- config loaded.- Returns:
- a Rainbow Gum or not.
-
priority
If there are multiple rainbow gum providers found the higher priority ones are tried first (provide(LogConfig)
). The default is0
.This feature allows custom rainbow gums for different environments like a testing version that lives in its own jar that is in Maven scope test. If its priority is higher and
provide(LogConfig)
returns a non-empty optional then it will be used instead of than the production Rainbow Gum.- Returns:
- priority order where higher number means it will be tried earlier.
-