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. 

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-jul 
instead of log4j-jpl. 

That is we may use java.lang.System.Logger, but Messagetext formatting could 
not be used. 

Nevertheless, log4j may be then at the right place as underlying implementation 
conforming more to this standard (and replaced more easily, if required)..

Concerning log4j-jcl, commons logging may come in as transient dependency?

Best regards, 

Georg

-----Ursprüngliche Nachricht-----
Von: Thomas Vandahl <[email protected]> 
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 
libraries that we use is quite comprehensive. Several other dependency 
libraries use slf4j as well. I was a bit hesitant to open this subject again 
because 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.lang.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 
supports a simple Service Loader mechanism to redirect logging to an 
implementation of your choice (for log4j2, one would simply add the log4j-jpl 
dependency). 

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.apache.commons.jcs3.log.SystemLogAdapter

I have no strong feelings about this but wanted to start the discussion anyway.

What do you think?

Bye, Thomas 
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to