Started testing Java9 with log4j 1.2, SLF4J and logback projects

Ceki Gülcü ceki at qos.ch
Tue Feb 14 10:10:48 UTC 2017


Hi All,


We started testing SLF4J and logback projects using Java 9, more 
specifically build 154. As such, I would appreciate if you could add the 
following details onto the Quality Outreach wiki page.

Contact: Ceki Gülcü
SLF4J mailing list  slf4j-dev AT qos DOT ch
Logback mailing list logback-dev AT qos DOT ch

Initial testing results
=======================

Initial testing indicates that log4j version 1.2.x is unable to parse 
the result of the call System.getProperties("java.version"). The 
returned string is "9-ea". However, log4j 1.2.x expects a string in the 
form "1\.*", for example "1.6", "1.7" etc.

If the string is not in the correct form, log4j 1.2.x conservatively 
assumes that it is running under Java 1.1 and disables certain important 
functions, such as MDC support. The code in question is the static 
initializer of the org.apache.log4j.helpers.Loader class.

Log4j 1.2.x is no longer maintained. However, there are innumerably many 
projects which still use log4j 1.2.x.

I would suggest that the string returned be in the form "1\.9*" such as
"1.9EA" so as not to break log4j 1.2.x under Java 9.

Many thanks in advance for taking the above into consideration.

Best regards,

--
Ceki Gülcü





More information about the quality-discuss mailing list