slog

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package slog is the legacy redacted standard-log cache adapter.

Deprecated: use github.com/faustbrian/go-cache/v2/adapters/slog. This package remains supported for the longer of 180 days after successor availability and two subsequently published stable root-module minor releases.

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 preserves the legacy slog adapter type identity.

func New

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

New validates config and constructs a logging observer.

func (*Observer) Observe

func (observer *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