BP-69: Convert http, tools, benchmark and metadata-drivers to slog (phase 4+6)#4758
Open
merlimat wants to merge 3 commits intoapache:masterfrom
Open
BP-69: Convert http, tools, benchmark and metadata-drivers to slog (phase 4+6)#4758merlimat wants to merge 3 commits intoapache:masterfrom
merlimat wants to merge 3 commits intoapache:masterfrom
Conversation
Minimal scaffolding commit for the BP-69 slog migration series: - Add `io.github.merlimat.slog:slog:0.9.7` to the root pom.xml dependencyManagement and to the global compile classpath alongside the existing SLF4J API (which stays as the rendering backend). - Add lombok.config at the repo root so `@CustomLog` generates a slog `Logger` instead of an SLF4J one. - Register the slog jar in LICENSE-all.bin.txt, LICENSE-server.bin.txt and LICENSE-bkctl.bin.txt so the CI check-binary-license script finds it accounted for in the bundled-jars list. No actual Java file is converted in this commit. Individual module migrations stack on top of this one.
Pulls in the MDC propagation fix from merlimat/slog#6, which makes log4j2 ThreadContext entries visible on slog events emitted via the Log4j2Logger backend (so %X{key} layouts and appenders that read event.getContextData().getValue(key) see the caller's MDC).
zymap
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of BP-69 (SLF4J to slog migration). Converts the remaining peripheral modules to use slog for structured logging.
Stacked with (but independent of) #4754 / #4755 / #4756 / #4757 — each includes the same minimal
BP-69 basescaffolding commit, so this PR can merge independently.Scope
Modules converted (45 files total):
bookkeeper-http/*(5 files) — http-server, vertx-http-server, servlet-http-servertools/*(21 files) — ledger, framework, stream CLI, perf (journal / table / dlog)bookkeeper-benchmark(4 files) — TestClient, BenchThroughputLatency, BenchReadThroughputLatency, BenchBookiemetadata-drivers/etcd(15 files) — all etcd driver classes plus the vendoredio.etcd.jetcd.impl.EtcdConnectionManagerConversion patterns applied
LoggerFactory.getLogger(Foo.class)/@Slf4j→ Lombok@CustomLoggenerating a slogLogger.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 onlye.getMessage()was consumed.if (log.isDebugEnabled()) { log.debug(...) }→log.debug(e -> e.attr(...).log(...))lambda form (zero-overhead when disabled).log.info("simple")preserved when there are no attrs.ledgerId,bookieId,streamId,rangeId,path,key,revision,leaseId,cookiePath,watchId,throughput,latencyMs, etc. — no single-letter or genericargNkeys.No changes to log output format — slog with the SLF4J backend produces equivalent output.
Test plan
mvn compilepasses on all touched modulesmvn checkstyle:checkpasses on all touched modules