Class RainbowGumLoggingProvider

java.lang.Object
io.jstach.rainbowgum.helidon27.RainbowGumLoggingProvider
All Implemented Interfaces:
io.helidon.logging.common.spi.LoggingProvider

@ServiceProvider(io.helidon.logging.common.spi.LoggingProvider.class) public final class RainbowGumLoggingProvider extends Object implements io.helidon.logging.common.spi.LoggingProvider
Bootstraps Rainbow Gum at the exact point Helidon itself bootstraps logging.

Registered via ServiceLoader (io.helidon.logging.common.LogConfig's own static initializer calls ServiceLoader.load(Class) for LoggingProvider, then LoggingProvider.initialization() on whichever candidate sorts first). Confirmed by decompiling LogConfig: candidates are ordered by io.helidon.common.Weighted weight, descending, and the very first call any Helidon-generated Main class makes is LogConfig.initClass(), forcing that static initializer (and therefore this class's initialization()) to run before config, the service registry, or the webserver ever starts, and well before any application log line.

No @Weight annotation needed here: the default weight (100.0) already beats io.helidon.logging.jul.JulProvider's own @Weight(1) (confirmed by decompiling it), so this provider is picked automatically whenever both are on the classpath, no exclusion or configuration required.

Depends on rainbowgum-jul at runtime (see this module's pom.xml): calling RainbowGum.of() here only bootstraps Rainbow Gum itself. Actually routing java.util.logging.Logger calls (Helidon's own facade) through it is a separate step, io.jstach.rainbowgum.jul.JULConfigurator, which runs automatically as part of that same bootstrap sequence as long as rainbowgum-jul is present.

  • Constructor Details

  • Method Details

    • initialization

      public void initialization()
      Specified by:
      initialization in interface io.helidon.logging.common.spi.LoggingProvider
    • runTime

      public void runTime()
      Specified by:
      runTime in interface io.helidon.logging.common.spi.LoggingProvider