package testing

import "github.com/go-logr/logr/testing"

Index

Types

type NullLogger

type NullLogger = logr.DiscardLogger

NullLogger is a logr.Logger that does nothing.

Deprecated: NullLogger is idenitcal to logr.DiscardLogger. It is retained for backwards compatibility, but new users should use logr.DiscardLogger instead.

type TestLogger

type TestLogger struct {
	T *testing.T
}

TestLogger is a logr.Logger that prints through a testing.T object. Only error logs will have any effect.

func (TestLogger) Enabled

func (_ TestLogger) Enabled() bool

func (TestLogger) Error

func (log TestLogger) Error(err error, msg string, args ...interface{})

func (TestLogger) Info

func (_ TestLogger) Info(_ string, _ ...interface{})

func (TestLogger) V

func (log TestLogger) V(v int) logr.Logger

func (TestLogger) WithName

func (log TestLogger) WithName(_ string) logr.Logger

func (TestLogger) WithValues

func (log TestLogger) WithValues(_ ...interface{}) logr.Logger

Source Files

null.go test.go

Version
v0.4.0
Published
Jan 23, 2021
Platform
darwin/amd64
Imports
2 packages
Last checked
3 minutes ago

Tools for package owners.