custom_logger

command
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL