Commit Graph

1 Commits

Author SHA1 Message Date
nullkey fc694d5d21 fix(sdk): silence stdout logging via opt-in slog
The client SDK emitted 17 fmt.Printf / fmt.Println trace events directly to
stdout from KnowledgeQAStream and SearchKnowledge. Any consumer of the SDK —
the new CLI in particular — saw these lines interleaved with its own
output, breaking JSON envelope contracts and polluting human-mode tty.

Replace with a package-level slog logger. Default writes to io.Discard so
existing callers see no output change; set WEKNORA_SDK_DEBUG=1 to route
events to stderr for development.

No public SetLogger() API: the trace events were dev-only and a setter
would expand the SDK surface for a one-off use case.
2026-05-12 13:20:42 +08:00