testlogr

package
v0.0.0-...-2ae20b0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Implementation of the logr interface from github.com/go-logr/logr using the golang standard library testing package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestLogger

func NewTestLogger(t *testing.T) logr.Logger

Types

type TestLogger

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

TestLogger is a logr implementation using the golang standard testing.Log implementation.

func (*TestLogger) Enabled

func (l *TestLogger) Enabled() bool

func (*TestLogger) Error

func (l *TestLogger) Error(err error, msg string, kvs ...interface{})

func (*TestLogger) Info

func (l *TestLogger) Info(msg string, kvs ...interface{})

func (*TestLogger) SetLogLevel

func (l *TestLogger) SetLogLevel(lvl uint8)

func (*TestLogger) V

func (l *TestLogger) V(level int) logr.InfoLogger

func (*TestLogger) WithName

func (l *TestLogger) WithName(name string) logr.Logger

func (*TestLogger) WithValues

func (l *TestLogger) WithValues(kvs ...interface{}) logr.Logger

Jump to

Keyboard shortcuts

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