Module io.jstach.rainbowgum.jul.logmanager
LogManager replacement that routes every
java.util.logging.Logger directly through Rainbow Gum, bypassing the
standard JUL Handler/Level dispatch machinery entirely.
This is a separate module from io.jstach.rainbowgum.jul (which stays a
Handler-based bridge, installed onto whatever the default LogManager
already is) because replacing the LogManager itself is a much more invasive,
whole-JVM decision: it can only be activated via the java.util.logging.manager
system property, set before anything in the JVM has touched
java.util.logging, and it changes the behavior of every JUL Logger in
the process, not just the ones a Handler happens to see. Install by setting:
java.util.logging.manager=io.jstach.rainbowgum.jul.logmanager.RainbowGumLogManager
as a real -D JVM argument (or JDK_JAVA_OPTIONS environment variable) -
this cannot be done with System.setProperty(String, String) once the JVM has
started, since java.util.logging.LogManager's own bootstrap reads the property
exactly once, the first time anything touches JUL.
This is primarily useful for frameworks whose own internal logging is JUL-based and
which offer no other seam to redirect it. Helidon is the motivating case (see
doc/other-web-frameworks.md): Helidon's own helidon-logging-log4j
module uses the exact same mechanism, setting
java.util.logging.manager=org.apache.logging.log4j.jul.LogManager. This
module's own RainbowGumLogManager is
modeled closely on that Log4j2 implementation.
Works under GraalVM native-image with no consumer-side configuration - see
RainbowGumLogManager's own javadoc for the
build-time mechanism this module bundles to make that true.
-
Packages
ExportsPackageDescriptionAjava.util.logging.LogManagerimplementation backed by Rainbow Gum.