Skip to content

Conversation

@shubh-ranade
Copy link
Member

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

Use log4j2 property name.

With the changes in this PR, kafka-rest logs are saved to /path/to/kafka-rest/logs/kafka-rest.log when running LOG_DIR=/path/to/kafka-rest ./bin/kafka-rest-start ./config/kafka-rest.properties. If LOG_DIR is not set, logs are saved to logs/kafka-rest.log in the current working directory.

Follow up of #1368

@Copilot Copilot AI review requested due to automatic review settings April 14, 2025 13:20
@shubh-ranade shubh-ranade requested review from a team as code owners April 14, 2025 13:20
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.

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

@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
Member

@omkreddy omkreddy left a comment

Choose a reason for hiding this comment

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

Pls raise the PR for 8.0.x branch.

# installed
if [ -e "$base_dir/config/log4j2.yaml" ]; then # Dev environment
KAFKAREST_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/config/log4j2.yaml"
KAFKAREST_LOG4J_OPTS="-Dlog4j2.configurationFile=file:$base_dir/config/log4j2.yaml"
Copy link
Member

Choose a reason for hiding this comment

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

Should we change the variable here and above to either KAFKAREST_LOG4J2_OPTS or use logger for naming consistency? Also # logj4 settings the comment above should read log4j2/logger settings.

Copy link
Member Author

Choose a reason for hiding this comment

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

AK uses KAFKA_LOG4J_OPTS and we're already using log4j logging. Leaving this as KAFKAREST_LOG4J_OPTS isn't too bad imo.

@shubh-ranade shubh-ranade changed the base branch from master to 8.0.x April 14, 2025 14:03
@shubh-ranade
Copy link
Member Author

Verified that logs were saved to kafka-rest.log when running kafka-rest server locally.

@shubh-ranade shubh-ranade merged commit 3a919cd into 8.0.x Apr 15, 2025
2 checks passed
@shubh-ranade shubh-ranade deleted the fix-log4j2-config branch April 15, 2025 15:25
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