You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Ralph Goers <ra...@dslextreme.com> on 2021/12/18 17:12:27 UTC

[ANNOUNCEMENT] Apache Log4j 2.17.0 Released

The Apache Log4j 2 team is pleased to announce the Log4j 2.17.0 release!

Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many other modern features such as support for Markers, lambda expressions for lazy logging, property substitution using Lookups, multiple patterns on a PatternLayout and asynchronous Loggers. Another notable Log4j 2 feature is the ability to be "garbage-free" (avoid allocating temporary objects) while logging. In addition, Log4j 2 will not lose events while reconfiguring.

The artifacts may be downloaded from https://logging.apache.org/log4j/2.x/download.html.

The major changes contained in this release include:

	• Address CVE-2021-45105 by disabling recursive evaluation of Lookups during log event processing. Recursive evaluation is still allowed while generating the configuration.
	• The JndiLookup, JndiContextSelector, and JMSAppender now require individual system properties to be enabled.
	• Remove LDAP and LDAPS as supported protocols from JNDI.

The single log4j2.enableJndi property introduced in Log4j 2.16.0 has been replaced with three individual properties; log4j2.enableJndiContextSelector, log4j2.enableJndiJms, and log4j2.enableJndiLookup.

The Log4j 2.17.0 API, as well as many core components, maintains binary compatibility with previous releases.

GA Release 2.17.0

Changes in this version include:

Fixed Bugs

	• LOG4J2-3230: Fix string substitution recursion.
	• LOG4J2-3242: Limit JNDI to the java protocol only. JNDI will remain disabled by default. Rename JNDI enablement property from 'log4j2.enableJndi' to 'log4j2.enableJndiLookup', 'log4j2.enableJndiJms', and 'log4j2.enableJndiContextSelector'.
	• LOG4J2-3241: Do not declare log4j-api-java9 and log4j-core-java9 as dependencies as it causes problems with the Maven enforcer plugin.
	• LOG4J2-3247: PropertiesConfiguration.parseAppenderFilters NPE when parsing properties file filters.
	• LOG4J2-3249: Log4j 1.2 bridge for Syslog Appender defaults to port 512 instead of 514.
	• LOG4J2-3237: Log4j 1.2 bridge API hard codes the Syslog protocol to TCP.

Apache Log4j 2.17.0 requires a minimum of Java 8 to build and run. Log4j 2.12.2 is the last release to support Java 7. Java 7 is not longer supported by the Log4j team.

For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Apache Log4j 2 website: https://logging.apache.org/log4j/2.x/index.html.


Re: [ANNOUNCEMENT] Apache Log4j 2.17.0 Released

Posted by Ralph Goers <ra...@dslextreme.com>.
I’m not going to be a lot of help on this as I don’t use Gradle.

The only thing I can think of that could be affecting this is that the log4j-api pom.xml file was declaring a dependency 
on the zip file generated by the log4j-api-java9 module. It had “provided” scope meaning it should more or less be 
ignored since the system already would have it.  However, it was found that the Maven enforcer plugin was having 
problems with that since we don’t publish that artifact as part of the release as it is only used in the build process. 
It turned out the dependency wasn’t actually needed for the build so it was removed in 2.17.0.

Log4j-core had the same issue as it also had classes being compiled specifically for Java 9+.

Why that would cause problems with Gradle though I can’t say. You might check to see if there is something looking 
for log4j-api-java9 and/or log4j-core-java9.

Ralph

> On Dec 18, 2021, at 2:01 PM, jmiguel rodriguez <jm...@gmail.com> wrote:
> 
> Hi guys,
> 
> First message here, so first of all, THANK YOU VERY MUCH to the team. You
> really deserve a big present this christmas!
> 
> El sáb, 18 dic 2021 a las 18:12, Ralph Goers (<ra...@dslextreme.com>)
> escribió:
> 
>> The Apache Log4j 2 team is pleased to announce the Log4j 2.17.0 release!
>> 
> 
> And now my question: in a multimodule project I'm working in I've just
> tried to upgrade to 2.17.0. In about 25 modules there's just one that
> doesn't compile:
> 
> Could not get unknown property 'log4j2Version' for object of type
> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
> 
> Relevant trace :
> 
> A problem occurred evaluating project ':xxxxxxxxx'.
>> Could not get unknown property 'log4j2Version' for object of type
> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
> * Try:
>> Run with --info or --debug option to get more log output.
>> Run with --scan to get full insights.
> * Exception is:
> org.gradle.api.GradleScriptException: A problem occurred evaluating project
> ':screener-api'.
> at
> org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
> at
> org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
> at
> org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:79)
> at
> org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136)
> at
> org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)
> 
> [...]
> 
> Caused by: groovy.lang.MissingPropertyException: Could not get unknown
> property 'log4j2Version' for object of type
> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
> at
> org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:88)
> at
> org.gradle.internal.metaobject.ConfigureDelegate.getProperty(ConfigureDelegate.java:130)
> at
> build_e3ba1ynsfxxz4aoghafb89nxl$_run_closure5.doCall(/builds/-C27SRoJ/17/product/backend/backend/src/screener-api/build.gradle:127)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at
> org.gradle.util.internal.ClosureBackedAction.execute(ClosureBackedAction.java:72)
> at
> org.gradle.util.internal.ConfigureUtil.configureTarget(ConfigureUtil.java:155)
> at org.gradle.util.internal.ConfigureUtil.configure(ConfigureUtil.java:106)
> at
> org.gradle.api.internal.project.DefaultProject.dependencies(DefaultProject.java:1237)
> at jdk.internal.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at
> org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:484)
> at
> org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.java:196)
> at
> org.gradle.internal.metaobject.CompositeDynamicObject.tryInvokeMethod(CompositeDynamicObject.java:98)
> at
> org.gradle.internal.extensibility.MixInClosurePropertiesAsMethodsDynamicObject.tryInvokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:34)
> at
> org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.tryInvokeMethod(BasicScript.java:135)
> at
> org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
> at org.gradle.groovy.scripts.BasicScript.invokeMethod(BasicScript.java:84)
> at
> build_e3ba1ynsfxxz4aoghafb89nxl.run(/builds/-C27SRoJ/17/product/backend/backend/src/screener-api/build.gradle:60)
> at
> org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
> ... 174 more
> 
> Looks like a problem with gradle (7.3).  Java version is
> Temurin-17.0.1+12.  Rolling back to log4j 2.16.0 and everything is fine.
> 
> Any info would be appreciated.
> 
> Thank you!!
> 
> -- 
> saludos,
> jmiguel
> 
> Twitter: @jmiguel <http://www.twitter.com/jmiguel>
> https://www.jmiguel.eu


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: [ANNOUNCEMENT] Apache Log4j 2.17.0 Released

Posted by Ralph Goers <ra...@dslextreme.com>.
Not a problem. Glad your problem was fixed.

Ralph

> On Dec 18, 2021, at 2:12 PM, jmiguel rodriguez <jm...@gmail.com> wrote:
> 
> El sáb, 18 dic 2021 a las 22:01, jmiguel rodriguez (<
> jmiguel.rodriguez@gmail.com>) escribió:
> 
>> 
>> Hi guys,
>> 
>> First message here, so first of all, THANK YOU VERY MUCH to the team. You
>> really deserve a big present this christmas!
>> 
>> El sáb, 18 dic 2021 a las 18:12, Ralph Goers (<ra...@dslextreme.com>)
>> escribió:
>> 
>>> The Apache Log4j 2 team is pleased to announce the Log4j 2.17.0 release!
>>> 
>> 
>> And now my question: in a multimodule project I'm working in I've just
>> tried to upgrade to 2.17.0. In about 25 modules there's just one that
>> doesn't compile:
>> 
>> Could not get unknown property 'log4j2Version' for object of type
>> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
>> 
> 
> Sorry guys. I'm an (also tired on Saturday) idiot. My fault, a bad declared
> variable across the projects.  All looks good
> 
> Sorry again.
> 
> 
> 
> 
> -- 
> saludos,
> jmiguel
> 
> Twitter: @jmiguel <http://www.twitter.com/jmiguel>
> https://www.jmiguel.eu


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: [ANNOUNCEMENT] Apache Log4j 2.17.0 Released

Posted by jmiguel rodriguez <jm...@gmail.com>.
El sáb, 18 dic 2021 a las 22:01, jmiguel rodriguez (<
jmiguel.rodriguez@gmail.com>) escribió:

>
> Hi guys,
>
> First message here, so first of all, THANK YOU VERY MUCH to the team. You
> really deserve a big present this christmas!
>
> El sáb, 18 dic 2021 a las 18:12, Ralph Goers (<ra...@dslextreme.com>)
> escribió:
>
>> The Apache Log4j 2 team is pleased to announce the Log4j 2.17.0 release!
>>
>
> And now my question: in a multimodule project I'm working in I've just
> tried to upgrade to 2.17.0. In about 25 modules there's just one that
> doesn't compile:
>
> Could not get unknown property 'log4j2Version' for object of type
> org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
>

Sorry guys. I'm an (also tired on Saturday) idiot. My fault, a bad declared
variable across the projects.  All looks good

Sorry again.




-- 
 saludos,
 jmiguel

 Twitter: @jmiguel <http://www.twitter.com/jmiguel>
 https://www.jmiguel.eu

Re: [ANNOUNCEMENT] Apache Log4j 2.17.0 Released

Posted by jmiguel rodriguez <jm...@gmail.com>.
Hi guys,

First message here, so first of all, THANK YOU VERY MUCH to the team. You
really deserve a big present this christmas!

El sáb, 18 dic 2021 a las 18:12, Ralph Goers (<ra...@dslextreme.com>)
escribió:

> The Apache Log4j 2 team is pleased to announce the Log4j 2.17.0 release!
>

And now my question: in a multimodule project I'm working in I've just
tried to upgrade to 2.17.0. In about 25 modules there's just one that
doesn't compile:

Could not get unknown property 'log4j2Version' for object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler

Relevant trace :

A problem occurred evaluating project ':xxxxxxxxx'.
> Could not get unknown property 'log4j2Version' for object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating project
':screener-api'.
at
org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
at
org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
at
org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:79)
at
org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136)
at
org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)

[...]

Caused by: groovy.lang.MissingPropertyException: Could not get unknown
property 'log4j2Version' for object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
at
org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:88)
at
org.gradle.internal.metaobject.ConfigureDelegate.getProperty(ConfigureDelegate.java:130)
at
build_e3ba1ynsfxxz4aoghafb89nxl$_run_closure5.doCall(/builds/-C27SRoJ/17/product/backend/backend/src/screener-api/build.gradle:127)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at
org.gradle.util.internal.ClosureBackedAction.execute(ClosureBackedAction.java:72)
at
org.gradle.util.internal.ConfigureUtil.configureTarget(ConfigureUtil.java:155)
at org.gradle.util.internal.ConfigureUtil.configure(ConfigureUtil.java:106)
at
org.gradle.api.internal.project.DefaultProject.dependencies(DefaultProject.java:1237)
at jdk.internal.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at
org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:484)
at
org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.java:196)
at
org.gradle.internal.metaobject.CompositeDynamicObject.tryInvokeMethod(CompositeDynamicObject.java:98)
at
org.gradle.internal.extensibility.MixInClosurePropertiesAsMethodsDynamicObject.tryInvokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:34)
at
org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.tryInvokeMethod(BasicScript.java:135)
at
org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
at org.gradle.groovy.scripts.BasicScript.invokeMethod(BasicScript.java:84)
at
build_e3ba1ynsfxxz4aoghafb89nxl.run(/builds/-C27SRoJ/17/product/backend/backend/src/screener-api/build.gradle:60)
at
org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
... 174 more

Looks like a problem with gradle (7.3).  Java version is
Temurin-17.0.1+12.  Rolling back to log4j 2.16.0 and everything is fine.

Any info would be appreciated.

Thank you!!

-- 
 saludos,
 jmiguel

 Twitter: @jmiguel <http://www.twitter.com/jmiguel>
 https://www.jmiguel.eu