Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoLevelTime = removeReplaceAttrFunc(slog.LevelKey, slog.TimeKey) //nolint:gochecknoglobals NoLevelTimeJobID = removeReplaceAttrFunc(slog.LevelKey, slog.TimeKey, "job_id") //nolint:gochecknoglobals )
Standard functions suitable for use with slog.HandlerOptions.ReplaceAttr that remove certain log keys for better test output stability. Prefer NoLevelTime unless you also have `job_id` in output, then use the latter.
Functions ¶
This section is empty.
Types ¶
type SliceInt64 ¶ added in v0.25.0
type SliceInt64 []int64
SliceInt64 is a type that implements slog.LogValue and which will format a slice for inclusion in logging, but lazily so that no work is done unless a log line is actually emitted.
func (SliceInt64) LogValue ¶ added in v0.25.0
func (s SliceInt64) LogValue() slog.Value
type SliceString ¶ added in v0.25.0
type SliceString []string
SliceString is a type that implements slog.LogValue and which will format a slice for inclusion in logging, but lazily so that no work is done unless a log line is actually emitted.
func (SliceString) LogValue ¶ added in v0.25.0
func (s SliceString) LogValue() slog.Value
Click to show internal directories.
Click to hide internal directories.