You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "merlimat (via GitHub)" <gi...@apache.org> on 2026/04/15 23:19:48 UTC
[PR] [improve] PIP-467: Convert pulsar-broker module logging from SLF4J to slog [pulsar]
merlimat opened a new pull request, #25535:
URL: https://github.com/apache/pulsar/pull/25535
## Summary
- Convert 210 files in the `pulsar-broker` module from SLF4J to slog structured logging
- Add derived loggers with class-level context attributes (e.g. `topic`, `subscription`, `state`) so that related log lines carry the same structured context automatically
- Subclasses that previously inherited a `protected final Logger log` from their parent now declare their own logger that chains the parent's context via `Logger.get(SubClass.class).with().ctx(super.log).build()`, so the logger name matches the actual runtime class while still inheriting parent attributes
- Rename leftover generic `argN` attrs to meaningful names; strip stale SLF4J `{}` placeholder text from log messages
- Use short form `log.level("msg")` when no attributes are present
## Test plan
- [x] `./gradlew :pulsar-broker:compileJava` passes
- [x] `./gradlew :pulsar-broker:checkstyleMain` passes
- [x] `./gradlew :pulsar-broker:compileTestJava` passes
- [x] `./gradlew :pulsar-broker:checkstyleTest` passes
- [ ] CI passes
### Motivation
PIP-467
> [!NOTE]
> Please label this PR with `ready-to-test`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve] PIP-467: Convert pulsar-broker module logging from SLF4J to slog [pulsar]
Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat merged PR #25535:
URL: https://github.com/apache/pulsar/pull/25535
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org