merlimat opened a new pull request, #4758: URL: https://github.com/apache/bookkeeper/pull/4758
## Summary Part of [BP-69](https://issues.apache.org/jira/browse/BOOKKEEPER-XXXX) (SLF4J to slog migration). Converts the remaining peripheral modules to use [slog](https://github.com/merlimat/slog) for structured logging. Stacked with (but independent of) #4754 / #4755 / #4756 / #4757 — each includes the same minimal `BP-69 base` scaffolding commit, so this PR can merge independently. ## Scope Modules converted (45 files total): - **`bookkeeper-http/*`** (5 files) — http-server, vertx-http-server, servlet-http-server - **`tools/*`** (21 files) — ledger, framework, stream CLI, perf (journal / table / dlog) - **`bookkeeper-benchmark`** (4 files) — TestClient, BenchThroughputLatency, BenchReadThroughputLatency, BenchBookie - **`metadata-drivers/etcd`** (15 files) — all etcd driver classes plus the vendored `io.etcd.jetcd.impl.EtcdConnectionManager` ## Conversion patterns applied - `LoggerFactory.getLogger(Foo.class)` / `@Slf4j` → Lombok `@CustomLog` generating a slog `Logger`. - `log.info("text {} {}", a, b)` → `log.info().attr("nameA", a).attr("nameB", b).log("text")` — values become typed structured attributes. - `log.error("msg", exception)` → `log.error().exception(exception).log("msg")`; `.exceptionMessage(e)` used where only `e.getMessage()` was consumed. - `if (log.isDebugEnabled()) { log.debug(...) }` → `log.debug(e -> e.attr(...).log(...))` lambda form (zero-overhead when disabled). - Short form `log.info("simple")` preserved when there are no attrs. - Consistent attribute naming: `ledgerId`, `bookieId`, `streamId`, `rangeId`, `path`, `key`, `revision`, `leaseId`, `cookiePath`, `watchId`, `throughput`, `latencyMs`, etc. — no single-letter or generic `argN` keys. No changes to log output format — slog with the SLF4J backend produces equivalent output. ## Test plan - [ ] `mvn compile` passes on all touched modules - [ ] `mvn checkstyle:check` passes on all touched modules - [ ] Full CI matrix green -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
