loggingtest

package
v0.21.56 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWaitTimeout = errors.New("timeout")

ErrWaitTimeout is returned when a logging event doesn't happen within a timeout.

Functions

This section is empty.

Types

type Logger

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

Logger provides an implementation of the logging.Logger interface that can be used to receive notifications about log events.

func New

func New() *Logger

Returns a new, initialized instance of Logger.

func (*Logger) Close

func (tl *Logger) Close()

Closes the logger.

func (*Logger) Count added in v0.9.119

func (tl *Logger) Count(expression string) int

Count returns the recorded messages that match exp.

func (*Logger) Debug

func (tl *Logger) Debug(a ...interface{})

func (*Logger) Debugf

func (tl *Logger) Debugf(f string, a ...interface{})

func (*Logger) Error

func (tl *Logger) Error(a ...interface{})

func (*Logger) Errorf

func (tl *Logger) Errorf(f string, a ...interface{})

func (*Logger) Fire added in v0.13.119

func (tl *Logger) Fire(entry *logrus.Entry) error

func (*Logger) Info

func (tl *Logger) Info(a ...interface{})

func (*Logger) Infof

func (tl *Logger) Infof(f string, a ...interface{})

func (*Logger) Levels added in v0.13.119

func (tl *Logger) Levels() []logrus.Level

func (*Logger) Mute added in v0.9.80

func (tl *Logger) Mute()

func (*Logger) Reset

func (tl *Logger) Reset()

Clears the stored logging events.

func (*Logger) Unmute added in v0.9.80

func (tl *Logger) Unmute()

func (*Logger) WaitFor

func (tl *Logger) WaitFor(exp string, to time.Duration) error

Returns nil when a logging event matching exp was received or returns ErrWaitTimeout when to timeout expired.

func (*Logger) WaitForN

func (tl *Logger) WaitForN(exp string, n int, to time.Duration) error

Returns nil when n logging events matching exp were received or returns ErrWaitTimeout when to timeout expired.

func (*Logger) Warn

func (tl *Logger) Warn(a ...interface{})

func (*Logger) Warnf

func (tl *Logger) Warnf(f string, a ...interface{})

Jump to

Keyboard shortcuts

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