test

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 1 module, 1 package

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

This section is empty.

Types

type LogEntry

type LogEntry struct {
	Level   logging.Level
	Fields  map[string]interface{}
	Message string
}

LogEntry represents a log message.

type Logger

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

Logger implementation that buffers messages for test purposes.

func New

func New() *Logger

New instantiates new Logger.

func (*Logger) Debug

func (l *Logger) Debug(f string, a ...interface{})

Debug buffers a log message.

func (*Logger) Entries

func (l *Logger) Entries() []LogEntry

Entries returns buffered log entries.

func (*Logger) Error

func (l *Logger) Error(f string, a ...interface{})

Error buffers a log message.

func (*Logger) GetLevel

func (l *Logger) GetLevel() logging.Level

GetLevel get log level.

func (*Logger) Info

func (l *Logger) Info(f string, a ...interface{})

Info buffers a log message.

func (*Logger) SetLevel

func (l *Logger) SetLevel(level logging.Level)

SetLevel set log level.

func (*Logger) Warn

func (l *Logger) Warn(f string, a ...interface{})

Warn buffers a log message.

func (*Logger) WithFields

func (l *Logger) WithFields(fields map[string]interface{}) logging.Logger

WithFields provides additional fields to include in log output. Implemented here primarily to be able to switch between implementations without loss of data.

Jump to

Keyboard shortcuts

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