Documentation
¶
Overview ¶
Demonstrates routing opencodesdk's internal logs through a custom slog.Handler. The SDK always speaks slog — any compliant handler works. This example uses a minimal in-memory handler that tags records with a fixed "component=opencodesdk" prefix and mirrors them to stderr in a shape that matches your own application's logs.
Swap in your favourite slog handler (slog-logrus, slog-zerolog, slog-zap, etc.) and the SDK's output will blend into the rest of your log pipeline with no further wiring.
go run ./examples/custom_logger
Click to show internal directories.
Click to hide internal directories.