loggingtest

package
v0.9.148 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2018 License: Apache-2.0, MIT Imports: 5 Imported by: 0

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.110

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) Info

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

func (*Logger) Infof

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

func (*Logger) Mute added in v0.9.71

func (tl *Logger) Mute()

func (*Logger) Reset

func (tl *Logger) Reset()

Clears the stored logging events.

func (*Logger) Unmute added in v0.9.71

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