Skip to content

[improve] PIP-467: Convert pulsar-common module logging from SLF4J to slog#25506

Merged
merlimat merged 2 commits intoapache:masterfrom
merlimat:slog-common
Apr 10, 2026
Merged

[improve] PIP-467: Convert pulsar-common module logging from SLF4J to slog#25506
merlimat merged 2 commits intoapache:masterfrom
merlimat:slog-common

Conversation

@merlimat
Copy link
Copy Markdown
Contributor

Summary

  • Convert all 42 source and test files in pulsar-common from SLF4J to slog structured logging
  • Replace @Slf4j with @CustomLog and convert log statements to slog fluent API with structured attributes
  • Use .exception(e) for Throwable objects and lazy attrs where appropriate
  • Remove Logger parameter from internal FileUtils methods (use class-level logger instead)

Test plan

  • compileJava and compileTestJava pass
  • checkstyleMain and checkstyleTest pass
  • CI passes

Motivation

PIP-467

Modifications

Convert pulsar-common module from SLF4J to slog structured logging.

Note

Please label this PR with ready-to-test

@lhotari
Copy link
Copy Markdown
Member

lhotari commented Apr 10, 2026

btw. Should we also add the .git-blame-ignore-revs file for the large refactorings? It would have to be added after merging to master branch since the commit hash gets created at that point.
Locally it would require git config blame.ignoreRevsFile .git-blame-ignore-revs.
GitHub supports it by default: docs, announcement

Copy link
Copy Markdown
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@merlimat
Copy link
Copy Markdown
Contributor Author

btw. Should we also add the .git-blame-ignore-revs file for the large refactorings? It would have to be added after merging to master branch since the commit hash gets created at that point.

For as pure formatting change sure, though here there could potentially be bugs deriving from this commit, so it might be good to not hide them.

@merlimat merlimat merged commit 792a76a into apache:master Apr 10, 2026
80 of 82 checks passed
@merlimat merlimat deleted the slog-common branch April 10, 2026 19:32
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.

2 participants