You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Matt Sicker (Jira)" <ji...@apache.org> on 2021/12/16 16:54:00 UTC

[jira] [Commented] (LOG4J2-3243) Property log4j.configurationFile incorrectly documented, log4j.configuration missing

    [ https://issues.apache.org/jira/browse/LOG4J2-3243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17460875#comment-17460875 ] 

Matt Sicker commented on LOG4J2-3243:
-------------------------------------

The log4j2 system properties parser accepts property prefixes of "log4j", "log4j2", "org.apache.logging.log4j.", and some others. This was introduced years ago to help normalize the documented property names without having to change the code everywhere (along with preserving backward compatibility of configs). PRs would be welcome to update the docs, but Log4j 1.x is EOL and we don't support it.

> Property log4j.configurationFile incorrectly documented, log4j.configuration missing
> ------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3243
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3243
>             Project: Log4j 2
>          Issue Type: Documentation
>          Components: Configuration
>    Affects Versions: 2.16.0
>            Reporter: Sascha Volkenandt
>            Priority: Minor
>
> According to [1], Log4j looks for the system property log4j2.configurationFile. According to the sources of log4j-core-2.16.0 (ConfigurationFactory.java), the searched property is log4j.configurationFile. The other property does not seem to have any effect in recent versions.
> [1] [https://logging.apache.org/log4j/2.x/manual/configuration.html]
> Additionally, since 2.14.0 it looks for the property log4j.configuration (no "File"), which was also the property used by Log4j 1.x. As a consequence, logging stopped working in some of our systems after upgrading to 2.16.0 due to Log4Shell. Those systems are using both 1.x and 2.x so they have the property log4j.configuration set but not log4j.configurationFile, because we relied on the previous behaviour that if log4j.configurationFile is not set it looks in the classpath. I had to use a debugger to find out why it stopped working.
> It would be nice if that second property would also be mentioned in [1].



--
This message was sent by Atlassian Jira
(v8.20.1#820001)