AW: Turbine Logging with java.lang.System.Logger
"Kallidis, Georg" <[email protected]> Fri, 09 Jan 2026 14:29:29 +0100
| Newsgroups | gmane.comp.jakarta.turbine.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Thomas, hi Jeffery, I've read the blog article and we may change it. Formatting is as the author points out, will be log4j formatting, which is = different from JUL, which is default for System.Logger as you said.=20 In commons-jcs3 default JUL message formatting is used with a custom Logger= - This would only be possible, as it is said in the blog, if using lo4j-ju= l instead of log4j-jpl.=20 That is we may use java.lang.System.Logger, but Messagetext formatting coul= d not be used.=20 Nevertheless, log4j may be then at the right place as underlying implementa= tion conforming more to this standard (and replaced more easily, if require= d).. Concerning log4j-jcl, commons logging may come in as transient dependency? Best regards,=20 Georg -----Urspr=FCngliche Nachricht----- Von: Thomas Vandahl <[email protected]>=20 Gesendet: Donnerstag, 8. Januar 2026 17:07 An: Turbine Developers List <[email protected]> Betreff: RfD: Turbine Logging with java.lang.System.Logger Hi folks, when updating the Turbine dependencies, I found that the list of Log4j libr= aries that we use is quite comprehensive. Several other dependency librarie= s use slf4j as well. I was a bit hesitant to open this subject again becaus= e everyone seems to have strong opinions about logging. But anyway, here it= goes: Since Java 9, the JDK has a much improved logger implementation in java.lan= g.System.Logger. I switched to this in commons-jcs3 and it turned out to be= quite powerful. The standard implementations relies on JUL bust it support= s a simple Service Loader mechanism to redirect logging to an implementatio= n of your choice (for log4j2, one would simply add the log4j-jpl dependency= ).=20 See the blog article https://renato.athaydes.com/posts/java-system-logging = for more information. See my slim wrapper around the logger to keep the familiar methods in org.a= pache.commons.jcs3.log.SystemLogAdapter I have no strong feelings about this but wanted to start the discussion any= way. What do you think? Bye, Thomas=20 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]