Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KSQL-12881] | Log4j to Log4j2 Migration #10698

Merged
merged 10 commits into from
Mar 4, 2025
Merged

Conversation

VedarthConfluent
Copy link
Member

Description

This PR migrates ksqldb from log4j1 to log4j2 completely. Also ksqldb now uses KafkaAppender provided by log4j2 instead of kafka log4j appender, which was recently removed from kafka.

Testing done

This has been tested locally.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")
  • Do these changes have compatibility implications for rollback? If so, ensure that the ksql command version is bumped.

Resolve comments

Fix ksql engine tests

Fix test

Pass log4j2 config correctly

Fix debug level log

comment out the broken test temporarily

Fix null appender failure

Fix tests

Fix checkstyle errors

Fix more checkstyle errors

Fix logger mock related tests

Move teardown logic in the test

Fix timestamp log file appender

Migrate ProcessingLog to log4j2

Fix processing log tests

Fix processinglog test

Fix processing log message structure

Fix processing log impl tests

Remove redundant import

(cherry picked from commit 6609ed9fa19e573aba2ee3992b9d6b6d6b238f4a)
@Copilot Copilot bot review requested due to automatic review settings February 25, 2025 10:17
@VedarthConfluent VedarthConfluent requested review from JimGalasyn and a team as code owners February 25, 2025 10:17
@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.

Choose a reason for hiding this comment

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

Copilot reviewed 255 out of 270 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • ksqldb-benchmark/src/main/resources/log4j.properties: Language not supported
  • ksqldb-cli/src/assembly/standalone.xml: Language not supported
  • ksqldb-api-client/src/test/java/io/confluent/ksql/api/client/ClientTest.java: Evaluated as low risk
  • ksqldb-cli/src/main/java/io/confluent/ksql/cli/Cli.java: Evaluated as low risk
  • ksqldb-api-client/src/main/java/io/confluent/ksql/api/client/impl/StreamQueryResponseHandler.java: Evaluated as low risk
  • ksqldb-api-client/src/main/java/io/confluent/ksql/api/client/impl/ClientImpl.java: Evaluated as low risk
  • ksqldb-api-client/src/main/java/io/confluent/ksql/api/client/impl/ExecuteQueryResponseHandler.java: Evaluated as low risk
  • ksqldb-api-client/src/test/java/io/confluent/ksql/api/client/ClientBasicAuthTest.java: Evaluated as low risk
  • ksqldb-cli/src/main/java/io/confluent/ksql/Ksql.java: Evaluated as low risk
  • docs/tutorials/event-driven-microservice.md: Evaluated as low risk
  • docs/reference/processing-log.md: Evaluated as low risk
  • docs/operate-and-deploy/logging.md: Evaluated as low risk
  • docs/operate-and-deploy/installation/server-config/index.md: Evaluated as low risk
  • config/log4j2-silent.yaml: Evaluated as low risk
  • config/log4j2-sql-test.yaml: Evaluated as low risk
Comments suppressed due to low confidence (2)

config/log4j2-file.yaml:9

  • Ensure that the custom appender 'io.confluent.ksql.util.TimestampLogFileAppender' is correctly implemented and available in the classpath.
type: io.confluent.ksql.util.TimestampLogFileAppender

config/log4j2-file.yaml:12

  • Verify that the 'filePattern' aligns with the intended log rotation strategy and does not cause any unexpected behavior.
filePattern: ${ksql.log.dir}/ksql-cli/cli-%d{yyyy-MM-dd}-%i.log
@hrishabhg hrishabhg changed the title [KSQL-12881] | Vedarth Sharma | Log4j2 migration changes [KSQL-12881] | Log4j to Log4j2 Migration Feb 27, 2025
@VedarthConfluent
Copy link
Member Author

The semaphore CI tests are failing due to an unrelated issue in kafka streams. I think it should be safe to merge this PR as it was green before doc changes.

@VedarthConfluent VedarthConfluent merged commit 05364fc into master Mar 4, 2025
1 of 5 checks passed
@VedarthConfluent VedarthConfluent deleted the master-KSQL-12881 branch March 4, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants