logging

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default() *slog.Logger

func ErrAttr

func ErrAttr(err error) slog.Attr

func From

func From(ctx context.Context) *slog.Logger

func New

func New(w io.Writer, level slog.Level, format Format, stacktrace bool) *slog.Logger

func Quiet

func Quiet()

func RedactOptions added in v0.3.0

func RedactOptions() []masq.Option

RedactOptions returns this project's redaction policy: the `masq:"secret"` struct tag, the `secret_` field prefix, and the Authorization field name (a header map key cannot carry a struct tag).

It is exported because the logger is no longer the only consumer. The agent runtime renders a failed tool call's goerr values into the message the model is given (pkg/agent/kernel, toolErrorValuesMiddleware), which sends them to the LLM provider — so it has to redact by the same policy. Two independently maintained lists would drift, and the half that drifts is the one nobody notices until a value is already at a third party.

func SetDefault

func SetDefault(logger *slog.Logger)

func With

func With(ctx context.Context, logger *slog.Logger) context.Context

Types

type Format

type Format int
const (
	FormatConsole Format = iota + 1
	FormatJSON
)

Jump to

Keyboard shortcuts

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