Created attachment 765284 [details] Output of the 'diff' command comparing the JARs' contents The JAR installed by dev-java/log4j-core does not contain META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat, while the JAR built by the upstream and published to Maven Central for the package does have the file. This file is a "serialized plugin listing file" that lists the Log4j 2 built-in plugins (https://logging.apache.org/log4j/2.x/manual/plugins.html). Without this file, none of the Log4j 2 built-in plugins will be loaded during runtime, and consumers of Log4j 2 that need any of those plugins might not have working logging functionality. To compare the JAR installed by log4j-core-2.17.1.ebuild and the JAR built by the upstream, run these commands: # emerge -a1 dev-java/log4j-core $ curl -L https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.17.1/log4j-core-2.17.1.jar > /tmp/log4j-core-2.17.1.jar $ diff -u <(jar -tf /tmp/log4j-core-2.17.1.jar | sort) <(jar -tf "$(java-config -p log4j-core-2)" | sort)
Created attachment 765285 [details] Output of a Log4j 2 consumer program without Log4j2Plugins.dat
Created attachment 765286 [details] Output of a Log4j 2 consumer program when Log4j2Plugins.dat is present
Pasting some of the lines in attachment 765285 [details] to make the error messages more searchable, just in case a similar issue arises on another package: 2022-02-16 20:35:15,514 main ERROR Unable to locate plugin type for Loggers 2022-02-16 20:35:15,515 main ERROR Unable to locate plugin type for Appenders 2022-02-16 20:35:15,517 main ERROR Unable to locate plugin for AppenderRef 2022-02-16 20:35:15,519 main ERROR Unable to locate plugin for Logger 2022-02-16 20:35:15,522 main ERROR Unable to locate plugin for Root 2022-02-16 20:35:15,531 main ERROR Unable to locate plugin for PatternLayout 2022-02-16 20:35:15,531 main ERROR Unable to locate plugin for Console 2022-02-16 20:35:15,531 main ERROR Unable to locate plugin for ThresholdFilter 2022-02-16 20:35:15,531 main ERROR Unable to locate plugin for SizeBasedTriggeringPolicy 2022-02-16 20:35:15,531 main ERROR Unable to locate plugin for Policies 2022-02-16 20:35:15,532 main ERROR Unable to locate plugin for DefaultRolloverStrategy 2022-02-16 20:35:15,532 main ERROR Unable to locate plugin for RollingFile 2022-02-16 20:35:15,537 main WARN No Loggers were configured, using default. Is the Loggers element missing? 2022-02-16 20:35:15,547 main ERROR Unrecognized format specifier [level] 2022-02-16 20:35:15,547 main ERROR Unrecognized conversion specifier [level] starting at position 35 in conversion pattern. 2022-02-16 20:35:15,547 main ERROR Unrecognized format specifier [logger] 2022-02-16 20:35:15,548 main ERROR Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern. 2022-02-16 20:35:15,548 main ERROR Unrecognized format specifier [msg] 2022-02-16 20:35:15,548 main ERROR Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9337e7f990a15f7d2860c1dbdf45d60c91894b95 commit 9337e7f990a15f7d2860c1dbdf45d60c91894b95 Author: Yuan Liao <liaoyuan@gmail.com> AuthorDate: 2022-02-17 04:12:08 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2022-02-17 08:49:25 +0000 dev-java/log4j-core: Generate plugin listing file for consumers The serialized plugin listing file generated by the annotation processor invocation allows consumers of Log4j 2 to use the built-in plugins. Closes: https://bugs.gentoo.org/833511 Signed-off-by: Yuan Liao <liaoyuan@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/24224 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> dev-java/log4j-core/log4j-core-2.17.1-r1.ebuild | 171 ++++++++++++++++++++++++ 1 file changed, 171 insertions(+)