testlogger

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

NewSimple 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