Skip to content

Conversation

@shubh-ranade
Copy link
Member

@shubh-ranade shubh-ranade commented Apr 1, 2025

@Copilot Copilot AI review requested due to automatic review settings April 1, 2025 07:30
@shubh-ranade shubh-ranade requested review from a team as code owners April 1, 2025 07:30
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the project’s logging framework from slf4j to Log4j2 in accordance with the upgrade in log4j2. The changes primarily update import statements and logger instantiations across several modules.

Reviewed Changes

Copilot reviewed 29 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
kafka-rest/src/main/java/io/confluent/kafkarest/response/StreamingResponse.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/resources/AsyncResponses.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/requestlog/CustomLog.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/converters/ProtobufConverter.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/converters/JsonSchemaConverter.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/converters/AvroConverter.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/controllers/ReplicaManagerImpl.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/controllers/ProduceControllerImpl.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/controllers/PartitionManagerImpl.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/controllers/ConsumerLagManagerImpl.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/controllers/ConsumerGroupLagSummaryManagerImpl.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/common/KafkaFutures.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/KafkaRestMain.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/KafkaRestConfig.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/KafkaRestApplication.java Updated logger imports and instantiation
kafka-rest/src/main/java/io/confluent/kafkarest/DefaultKafkaRestContext.java Updated logger imports and instantiation
Files not reviewed (4)
  • checkstyle/import_control.xml: Language not supported
  • config/log4j.properties: Language not supported
  • config/log4j2.xml: Language not supported
  • kafka-rest/pom.xml: Language not supported
Comments suppressed due to low confidence (1)

kafka-rest/src/main/java/io/confluent/kafkarest/resources/AsyncResponses.java:91

  • The logger is using AsyncResponse.class instead of AsyncResponses.class, which may lead to confusion when identifying log entries. Consider updating the logger instantiation to use AsyncResponses.class.
private static final Logger log = LogManager.getLogger(AsyncResponse.class);

@trnguyencflt
Copy link
Member

[minor] the title should be migrate from reload4j (log4j1) to log4j2

@shubh-ranade shubh-ranade changed the title KNET-18079: Migrate slf4j to log4j2 KNET-18079: Migrate reload4j (log4j1) to log4j2 Apr 1, 2025
@airlock-confluentinc airlock-confluentinc bot force-pushed the sranade/log4j2-migration branch from 434d3f1 to 3919865 Compare April 2, 2025 14:54
@shubh-ranade
Copy link
Member Author

reload4j dependency is not included anymore

❯ mvn dependency:tree -Dincludes=org.slf4j
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] kafka-rest-parent                                                  [pom]
[INFO] kafka-rest                                                         [jar]
[INFO]
[INFO] -------------------< io.confluent:kafka-rest-parent >-------------------
[INFO] Building kafka-rest-parent 8.0.0-0                                 [1/2]
[INFO]   from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- dependency:3.3.0:tree (default-cli) @ kafka-rest-parent ---
[INFO] io.confluent:kafka-rest-parent:pom:8.0.0-0
[INFO] \- io.confluent:common-utils:jar:8.0.0-1302:compile
[INFO]    \- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO]
[INFO] ----------------------< io.confluent:kafka-rest >-----------------------
[INFO] Building kafka-rest 8.0.0-0                                        [2/2]
[INFO]   from kafka-rest/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- dependency:3.3.0:tree (default-cli) @ kafka-rest ---
[INFO] io.confluent:kafka-rest:jar:8.0.0-0
[INFO] \- org.apache.kafka:kafka-clients:jar:8.0.0-370-ccs:compile
[INFO]    \- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for kafka-rest-parent 8.0.0-0:
[INFO]
[INFO] kafka-rest-parent .................................. SUCCESS [  0.421 s]
[INFO] kafka-rest ......................................... SUCCESS [  6.851 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.650 s
[INFO] Finished at: 2025-04-02T20:26:35+05:30
[INFO] ------------------------------------------------------------------------
❯ mvn dependency:build-classpath -DincludeArtifactIds=slf4j-reload4j
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] kafka-rest-parent                                                  [pom]
[INFO] kafka-rest                                                         [jar]
[INFO]
[INFO] -------------------< io.confluent:kafka-rest-parent >-------------------
[INFO] Building kafka-rest-parent 8.0.0-0                                 [1/2]
[INFO]   from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- dependency:3.3.0:build-classpath (default-cli) @ kafka-rest-parent ---
[INFO] No dependencies found.
[INFO] Dependencies classpath:

[INFO]
[INFO] ----------------------< io.confluent:kafka-rest >-----------------------
[INFO] Building kafka-rest 8.0.0-0                                        [2/2]
[INFO]   from kafka-rest/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- dependency:3.3.0:build-classpath (default-cli) @ kafka-rest ---
[INFO] No dependencies found.
[INFO] Dependencies classpath:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for kafka-rest-parent 8.0.0-0:
[INFO]
[INFO] kafka-rest-parent .................................. SUCCESS [  0.420 s]
[INFO] kafka-rest ......................................... SUCCESS [  7.171 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.974 s
[INFO] Finished at: 2025-04-02T20:27:56+05:30
[INFO] ------------------------------------------------------------------------

Copy link
Member

@xuliang2019 xuliang2019 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shubh-ranade shubh-ranade enabled auto-merge (squash) April 3, 2025 12:52
@shubh-ranade shubh-ranade merged commit 1789338 into master Apr 3, 2025
2 checks passed
@shubh-ranade shubh-ranade deleted the sranade/log4j2-migration branch April 3, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants