Module io.jstach.rainbowgum.scopedkeyvalues.provider
module io.jstach.rainbowgum.scopedkeyvalues.provider
EXPERIMENTAL The RainbowGum-backed
io.jstach.rainbowgum.scopedkeyvalues.spi.ScopedKeyValuesProvider for
io.jstach.rainbowgum.scopedkeyvalues.ScopedKeyValues - request/task-scoped key
values backed by java.lang.ScopedValue instead of ThreadLocal. Simply
being on the classpath is enough: this module's
ScopedKeyValuesConfigurator
registers a LogEventFactory that rainbowgum-slf4j picks up
automatically, merging the current scoped key values underneath MDC for every event it
builds.
Requires a JVM supporting java.lang.ScopedValue (finalized in JDK 25,
JEP 506) - newer than this project's usual
baseline, which is why this module alone overrides its own build's Java release. The
io.jstach.rainbowgum.scopedkeyvalues API module this implements does not share
that requirement.
-
Packages
ExportsPackageDescriptionThe RainbowGum-backedScopedKeyValuesProvider, usingjava.lang.ScopedValuefor storage, plus theRainbowGumServiceProviderthat wires the result intorainbowgum-slf4j. -
Services
ProvidesTypeDescriptionRainbowGum SPI.Service Provider InterfaceServiceLoaderactually discovers forScopedKeyValues- a factory rather than theScopedKeyValuesProvideritself, since a factory method can do things a bare no-arg-constructorServiceLoaderinstantiation cannot (validate preconditions, choose between alternate implementations, read configuration, etc) withoutScopedKeyValuesneeding to know anything about how the provider it gets back was actually put together.