[
https://issues.apache.org/jira/browse/LOG4J2-3063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anand Beh updated LOG4J2-3063:
------------------------------
Description:
log4j-api's module-info is missing "provides PropertySource ..." directives.
This causes the ServiceLoader to not be able to detect
SystemPropertiesPropertySource when running on the module path.
Consequently from that, the normalized system properties from log4j 2.10+ have
no effect when running on the module-path.
----
Reproducer here: [https://github.com/A248/Log4j2-3063] .
The application can be run with "./run.sh classpath" or "./run.sh modulepath".
The log4j2.configurationFile property, which enables the specified
configuration, only takes effect when running on the class-path.
Besides log4j2.configurationFile, other normalized properties such as
log4j2.asyncLoggerWaitStrategy also do not function on the module-path.
The normalized system properties are only effective when running on the
class-path. Running on the module-path requires using the legacy properties.
was:
log4j-api's module-info is missing "provides PropertySource ..." directives.
This causes the ServiceLoader to not be able to detect
SystemPropertiesPropertySource when running on the module path.
Consequently from that, the normalized system properties from log4j 2.10+ have
no effect when running on the module-path.
Reproducer here: [https://github.com/A248/Log4j2-3063] . The application is
intended to be configured with the log4j2-debug.xml configuration passed
through -Dlog4j2.configurationFile. However, this file only takes effect when
run with "./run.sh classpath". Using "./run.sh modulepath" the configuration
file is not used.
Besides log4j2.configurationFile, other normalized properties
log4j2.asyncLoggerWaitStrategy need to be changed to their legacy forms when
running on the module-path.
The normalized system properties are thus only effective when running on the
class-path. Running on the module-path requires using the legacy properties.
> Missing provides directives in module-info cause system properties to not
> accept post log4j 2.10 normalized versions
> --------------------------------------------------------------------------------------------------------------------
>
> Key: LOG4J2-3063
> URL: https://issues.apache.org/jira/browse/LOG4J2-3063
> Project: Log4j 2
> Issue Type: Bug
> Components: API
> Affects Versions: 2.14.0
> Environment:
> Reproduced environment:
> * log4j 2.14.0
> * Compiled with --release 11 and Zulu16.28+11
> Original environment the bug was discovered in:
> * log4j 2.14.0, log4j-jul 2.14.0, log4j-slf4j-impl 2.14.0, log4j-iostreams
> 2.14.0
> * Compiled with --release 16 and Zulu16.28+11
> Reporter: Anand Beh
> Priority: Major
> Fix For: 2.15.0
>
>
> log4j-api's module-info is missing "provides PropertySource ..." directives.
> This causes the ServiceLoader to not be able to detect
> SystemPropertiesPropertySource when running on the module path.
> Consequently from that, the normalized system properties from log4j 2.10+
> have no effect when running on the module-path.
> ----
> Reproducer here: [https://github.com/A248/Log4j2-3063] .
> The application can be run with "./run.sh classpath" or "./run.sh
> modulepath". The log4j2.configurationFile property, which enables the
> specified configuration, only takes effect when running on the class-path.
> Besides log4j2.configurationFile, other normalized properties such as
> log4j2.asyncLoggerWaitStrategy also do not function on the module-path.
> The normalized system properties are only effective when running on the
> class-path. Running on the module-path requires using the legacy properties.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)