slog

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package slog records redacted cache events with the standard log package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger      *logslog.Logger
	Level       logslog.Level
	IncludeSize bool
}

Config selects the logger and level used by an Observer.

type Observer

type Observer struct {
	// contains filtered or unexported fields
}

Observer writes redacted semantic cache events through slog.

func New

func New(config Config) (*Observer, error)

New validates config and constructs a logging observer.

func (*Observer) Observe

func (o *Observer) Observe(ctx context.Context, event cache.Event) error

Observe logs one event without key or value data.

Jump to

Keyboard shortcuts

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