testlogger

package
v1.0.1-rc.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(t TestingT, timeLayout ...string) *logger.Logger

NewLogger produces a logger adjusted for test cases.

func NewNamedLogger

func NewNamedLogger(name string, timeLayout ...string) *logger.Logger

NewNamedLogger produces a logger adjusted for test cases.

func NewSilentLogger

func NewSilentLogger(name string, printStackTrace bool, timeLayout ...string) *logger.Logger

func NewSimple

func NewSimple(debug bool) *logger.Logger

NewLogger produces a logger adjusted for test cases.

func WithLevel

func WithLevel(log *logger.Logger, level logger.Level, printStackTrace bool) *logger.Logger

WithLevel returns a logger with a level increased. Can be useful in tests to disable logging in some parts of the system.

Types

type TestingT added in v1.0.3

type TestingT interface {
	Name() string
}

Jump to

Keyboard shortcuts

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