Skip to content

refactor(examples): use SLF4J parameterized logging instead of string concatenation#19187

Merged
yihua merged 1 commit into
apache:masterfrom
voonhous:cleanup-slf4j-log-templating-examples
Jul 4, 2026
Merged

refactor(examples): use SLF4J parameterized logging instead of string concatenation#19187
yihua merged 1 commit into
apache:masterfrom
voonhous:cleanup-slf4j-log-templating-examples

Conversation

@voonhous

@voonhous voonhous commented Jul 4, 2026

Copy link
Copy Markdown
Member

Describe the issue this Pull Request addresses

The log calls in HoodieWriteClientExample build their message with + string concatenation. This eagerly builds the string even when the level is disabled and reads worse than a parameterized statement. This PR converts them to SLF4J {} templating. Part of the ongoing logging cleanup (follows #19155, #19156, #19157, #19158, #19159, #19160, #19184, #19185, #19186).

Summary and Changelog

  • Converted the repeated log.info("Starting commit " + newCommitTime) statements in HoodieWriteClientExample to {} placeholders. Mechanical and behavior-preserving.

Impact

none - example-only, purely mechanical logging change.

Risk Level

none

Documentation Update

none

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

… concatenation

Convert the repeated 'Starting commit' log statements in
HoodieWriteClientExample from + concatenation to {} placeholders.
Mechanical and behavior-preserving.
@voonhous voonhous changed the title refactor(examples): use SLF4J parameterized logging instead of string… refactor(examples): use SLF4J parameterized logging instead of string concatenation Jul 4, 2026
@github-actions github-actions Bot added the size:XS PR with lines of changes in <= 10 label Jul 4, 2026

@hudi-agent hudi-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ 🤖 This review was generated by an AI agent and may contain mistakes. Please verify any suggestions before applying.

Thanks for working on this! This PR converts string-concatenation log statements in HoodieWriteClientExample to SLF4J parameterized logging, which is a mechanical and behavior-preserving change. No issues flagged from this automated pass — a Hudi committer or PMC member can take it from here for a final review.

cc @yihua

@hudi-bot

hudi-bot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@yihua yihua left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@yihua yihua enabled auto-merge (squash) July 4, 2026 20:29
@yihua yihua merged commit 51b5733 into apache:master Jul 4, 2026
144 of 279 checks passed
@voonhous voonhous deleted the cleanup-slf4j-log-templating-examples branch July 5, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS PR with lines of changes in <= 10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants