Documentation
¶
Overview ¶
Package cacheslog 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 is retained and caller-owned, including handlers and their blocking behavior.
Logger *logslog.Logger
// Level is the level passed to LogAttrs without filtering in this adapter.
Level logslog.Level
// IncludeSize adds the size_bytes field when true; zero omits it.
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 (*Observer) Observe ¶
Observe synchronously forwards event fields to the configured logger. Unlike OTel it does not validate operation/outcome constants; direct callers must supply bounded safe labels, and logger/handler attributes can add data. This method does not itself recover handler panics.
Click to show internal directories.
Click to hide internal directories.