A modern modular JDK 21+ logging framework that offers implementations for multiple facades like SLF4J / System.Logger and does mostly what you want out of the box.
It is called rainbow gum after Eucalyptus Deglupta a beautiful tree native to Hawaii that has colorful bark (colorful logs).
In Rainbow Gum you can:
- Leverage your existing configuration/application framework (like avaje-config or Spring Boot
Environment). - Do all your logging configuration in Java with a discoverable API of builders
- Only use System Properties and no loading of resources for a ultimate minimal experience
- Or various combinations of the above
Because Rainbow Gum is very modular it can provide a more "choose your own" experience where you can scale down and only use the JDK System.Logger
with minimal dependencies or scale up with fully loaded ANSI SLF4J experience.
In some cases just adding modules will provide automatic configuration.
Rainbow Gum's default property configuration follows Spring Boot's patterns so if you are familiar with logging.level...
than you will feel at home with Rainbow Gum whether you use Spring or not.
Regardless of which configuration option you choose it is GraalVM native friendly, Jlinkable, and initializes hella fast.
The long term goal of Rainbow Gum is to be a logging framework for all with the only requirement being a modern JDK.
Warning
While this readme does contain some documentation the above is the preferred documentation and more likely to be up to date and correct!
The doc is also on javadoc.io but is not aggregated like the above.
For previous releases:
https://jstach.io/doc/rainbowgum/VERSION/apidocs
Where VERSION is the version you want.
Covered in why_rainbowgum_is_better.md.
Rainbow Gum core comes with themes that work on three different formats also included in core: TTLL, JSON5, and logfmt.
The console format below is TTLL (time, thread, level, logger), colored with the "One Dark" theme (note no pattern module or pattern string is needed and only one line of configuration is required):
logging.appender.console.encoder.ttll.theme=one_darkdarcula uses IntelliJ's colors:
spring matches Spring Boot's console colors and, like rainbowgum, uses the terminal's
own palette, so it works on light backgrounds too:
The same themes color the structured encoders in core. logfmt writes one key=value line
per event for Loki, Vector and Go tooling:
logging.appender.console.encoder.uri=logfmt
logging.appender.console.encoder.logfmt.theme=one_darkjson5 switches to structured output while you hunt a bug, here pretty printed:
logging.appender.console.encoder.uri=json5
logging.appender.console.encoder.json5.prettyPrint=fullColor is only written when the console supports ANSI, so piping to a file stays plain. The screenshots are Rainbow Gum's real output rendered with xterm.js; see etc/screenshots/generate.
Covered in development.md





