Help us shape the future of Go! Take the 2026 Go Developer Survey

logger

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package logger provides internal logging utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFailTestLogger

func NewFailTestLogger(t *testing.T) logger.Logger

NewFailTestLogger creates a new test logger that fails on errors or warnings.

Types

type FailTestLogger

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

FailTestLogger is a logger that fails tests when the application emits warnings or errors. Use this in tests to assert that application code doesn't produce unexpected warnings/errors.

func (*FailTestLogger) Debug

func (l *FailTestLogger) Debug(msg string, args ...any)

Debug is a no-op. Debug logs are expected and don't indicate problems.

func (*FailTestLogger) Error

func (l *FailTestLogger) Error(msg string, args ...any)

Error fails the test. Application code should not emit errors during tests.

func (*FailTestLogger) Info

func (l *FailTestLogger) Info(msg string, args ...any)

Info is a no-op. Info logs are expected and don't indicate problems.

func (*FailTestLogger) Warn

func (l *FailTestLogger) Warn(msg string, args ...any)

Warn fails the test. Application code should not emit warnings during tests.

Jump to

Keyboard shortcuts

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