log

package
v0.0.0-...-d534c4c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package log forwards logs to testing.T.Log* methods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DelegateLogger

type DelegateLogger interface {
	Log(args ...any)
	Logf(format string, args ...any)
}

type Logger

type Logger interface {
	DelegateLogger
	Enabled() bool
	Error(message string)
	Errorf(format string, args ...any)
	Info(message string)
	Infof(format string, args ...any)
	Name(name string)
	Printf(format string, v ...any)
	V(level log.Level) log.InfoLogger
	Warn(message string)
	Warnf(format string, args ...any)
}

func LoggerFor

func LoggerFor(ctx context.Context) (Logger, context.Context)

LoggerFor returns the logger for the provided Context, it is expected that a *testing.T instance is stored in the Context under the TestingKey key

Jump to

Keyboard shortcuts

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