test

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestLogger

func NewTestLogger(t *testing.T, level zapcore.LevelEnabler) (*zap.Logger, *observer.ObservedLogs)

NewTestLogger wraps a zaptest logger to tee output and provide ObservedLogs to validate in tests.

func ValidateOutput

func ValidateOutput(t *testing.T, logOutput *observer.ObservedLogs, toValidate []LogOutput)

ValidateOutput takes the provided ObservedLogs and validates all the provided LogOutput entries.

Types

type LogOutput

type LogOutput struct {
	Level   zapcore.Level
	Message string
	Fields  map[string]any
}

Jump to

Keyboard shortcuts

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