Use Log4j2 instead of SLF4J for our own loggers #864
Merged
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.
Right now, the bridge seems to be using SLF4J for logging. It seems to have also a mix of ways how the loggers are defined.
This PR moves it to use Log4j2 and unifies the way the loggers are created (as a
static final
variables calledLOGGER
). The only exception is the logging of the HTTP request that seems to not use logger based on the class but rather based on the endpoint - this behavior is kept. These changes bring the Bridge more in-line with Strimzi operators and should make it easier to manage and test the logging dependencies. It also allows it to remove SLF4J as a direct dependency (but it remains a transitive dependency for things such as Kafka clients). This does change only the API used for logging. The actual logging was already before done with Log4j2.