testlog

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package testlog adapts testing-style loggers to slog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(tb TB) *slog.Logger

New returns a logger that writes each record to tb.

Types

type TB

type TB interface {
	Helper()
	Log(args ...any)
}

TB is the subset of testing.TB needed to write logs to a test.

Jump to

Keyboard shortcuts

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