Skip to content

refactor(aws): use SLF4J parameterized logging instead of string concatenation#19186

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

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

Conversation

@voonhous

@voonhous voonhous commented Jul 4, 2026

Copy link
Copy Markdown
Member

Describe the issue this Pull Request addresses

A number of log calls in hudi-aws 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).

Summary and Changelog

  • Converted string-concatenation log calls to {} placeholders across hudi-aws (AWSGlueCatalogSyncClient, DynamoTableUtils). Mechanical and behavior-preserving.
  • DynamoTableUtils: the trailing exception stays the last arg so its stacktrace is logged as before; kept the existing isTraceEnabled() guards.

Impact

none - purely mechanical, behavior-preserving 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

…atenation

Convert log string concatenation to {} placeholders across hudi-aws.
Mechanical and behavior-preserving. In DynamoTableUtils the trailing
exception stays the last arg (stacktrace preserved); kept the existing
isTraceEnabled() guards.
@voonhous voonhous changed the title refactor(aws): use SLF4J parameterized logging instead of string conc… refactor(aws): use SLF4J parameterized logging instead of string concatenation Jul 4, 2026
@github-actions github-actions Bot added the size:S PR with lines of changes in (10, 100] 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 mechanically converts string-concatenation log calls to SLF4J parameterized logging in hudi-aws. The conversions preserve behavior, including trailing-throwable handling in the DynamoTableUtils trace statements. 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 merged commit 60a3e9a into apache:master Jul 4, 2026
74 of 75 checks passed
@voonhous voonhous deleted the cleanup-slf4j-log-templating-aws 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:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants