Repository navigation
Move bookkeeper-server log4j2.xml out of the published jar - #4919
Open
henriquejsza wants to merge 1 commit into
Open
henriquejsza wants to merge 1 commit into
henriquejsza wants to merge 1 commit into
Conversation
Log4j advises libraries to keep configuration files on the test classpath only, so they do not override a downstream application's configuration via Log4j2 automatic configuration. The bookkeeper-server jar bundled log4j2.xml at its root, which could be picked up by consumers such as Pulsar when their own module lacked a configuration file. Move log4j2.xml from src/main/resources to src/test/resources so the console configuration is still used when running the module's tests but is no longer packaged into the published artifact. The server distribution is unaffected: it loads conf/log4j2.xml (assembled from the top-level conf directory and referenced by bin/common.sh), not the jar-bundled file. Signed-off-by: henriquejsza <henriquejsza@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #4603
Motivation
Log4j advises that libraries only add configuration files to their test
classpath, so they do not override a downstream application's configuration via
Log4j2 automatic configuration
(https://logging.apache.org/log4j/2.x/manual/configuration.html#automatic-configuration).
The
bookkeeper-serverjar bundleslog4j2.xmlat its root(
bookkeeper-server/src/main/resources/log4j2.xml). As reported, this file canbe picked up by consumers such as Pulsar when their own module does not provide
a configuration file.
Changes
log4j2.xmlfrombookkeeper-server/src/main/resourcestobookkeeper-server/src/test/resources. The console configuration is stillused when running the module's tests, but the file is no longer packaged into
the published artifact.
The server distribution is unaffected: it loads
conf/log4j2.xml(assembledfrom the top-level
confdirectory inbookkeeper-distand referenced bybin/common.sh), not the jar-bundled file.