fix(sdk): log spool warnings through SLF4J, not System.err - #150
Merged
Merged
Conversation
The SDK runs inside someone else's application, so dropped or unreadable spooled data belongs in that application's logging backend, where it can be routed and alerted on. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
olavgg
approved these changes
Sep 30, 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.
Why
The SDK wrote its warnings straight to
System.err. It runs inside other people's applications, so those messages bypassed the application's logging entirely: no levels, no routing, nothing a log pipeline or alert could pick up.These are not noise. All four report spooled ingest data being lost or skipped:
TimeseriesService);EventService);DurableSpool);DurableSpool).Data loss is exactly what an operator wants in their logs.
What changes
warnlogs on the owning class's logger, with parameterised messages instead of string concatenation.slf4j-apiis declared directly in the SDK. It already arrived transitively throughdatahub-api-model, so no new jar reaches consumers; it is declared because the SDK now uses it itself.AGENTS.mdgains the rule "log through SLF4J, neverSystem.err/System.out".Trade-off: an application with no SLF4J backend used to see these messages on the console and now will not. SLF4J prints one "no providers" notice instead. That is the standard behaviour for a library.
Docs
Verification
:datahub-java-sdk:buildis green, and noSystem.errorSystem.outremains in SDK main sources.🤖 Generated with Claude Code