merlimat opened a new pull request, #4756: URL: https://github.com/apache/bookkeeper/pull/4756
## Summary Part of [BP-69](https://issues.apache.org/jira/browse/BOOKKEEPER-XXXX) (SLF4J to slog migration). Converts the `bookkeeper-server` module to use [slog](https://github.com/merlimat/slog) for structured logging. This PR is stacked on #4754 (common, phase 1) and #4755 (stats, phase 2), but has its own minimal base commit so it can merge independently: 1. `BP-69 base: add slog dependency and LICENSE entries` — minimal scaffolding: adds slog to root `pom.xml`, updates `LICENSE-*.bin.txt` files, and adds `lombok.config` for the `@CustomLog` annotation. 2. `BP-69: Convert bookkeeper-server from SLF4J to slog` — the actual module conversion (252 files). ## 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")`. - `if (log.isDebugEnabled()) { ... }` → lambda form `log.debug(e -> e.attr(...).log(...))` where the cost of evaluation matters. - Consistent attribute naming: `ledgerId`, `entryId`, `thread`, `directory`, `fileInfo`, etc. No changes to log output format — slog with the SLF4J backend produces equivalent output. ## Test plan - [ ] `mvn -pl bookkeeper-server compile` passes - [ ] `mvn -pl bookkeeper-server checkstyle:check` passes - [ ] `mvn -pl bookkeeper-server test` passes in CI - [ ] 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]
