Documentation ¶
Index ¶
- type Logger
- type TestLogger
- func (l *TestLogger) Debug(args ...interface{})
- func (l *TestLogger) Debugf(format string, args ...interface{})
- func (l *TestLogger) Error(args ...interface{})
- func (l *TestLogger) Errorf(format string, args ...interface{})
- func (l *TestLogger) Errors() int
- func (l *TestLogger) Fatal(args ...interface{})
- func (l *TestLogger) Fatalf(format string, args ...interface{})
- func (l *TestLogger) Fatals() int
- func (l *TestLogger) HasFailures() bool
- func (l *TestLogger) Info(args ...interface{})
- func (l *TestLogger) Infof(format string, args ...interface{})
- func (l *TestLogger) Panic(args ...interface{})
- func (l *TestLogger) Panicf(format string, args ...interface{})
- func (l *TestLogger) Panics() int
- func (l *TestLogger) Print(args ...interface{})
- func (l *TestLogger) Printf(format string, args ...interface{})
- func (l *TestLogger) Println(args ...interface{})
- func (l *TestLogger) Warn(args ...interface{})
- func (l *TestLogger) Warnf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Printf(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Panicf(format string, args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Print(args ...interface{}) Println(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Panic(args ...interface{}) }
Logger is a simple interface used as an abstraction for logrus.Entry - somewhat between logrus.StdLogger and logrus.FieldLogger
type TestLogger ¶
type TestLogger struct {
// contains filtered or unexported fields
}
TestLogger implements a test wrapper for testing.T implementing Logger interface
func NewNonFailingTestLogger ¶ added in v1.2.0
func NewNonFailingTestLogger(t *testing.T) *TestLogger
NewNonFailingTestLogger returns a new TestLogger
func NewTestLogger ¶
func NewTestLogger(t *testing.T) *TestLogger
NewTestLogger returns a new TestLogger
func (*TestLogger) Debug ¶
func (l *TestLogger) Debug(args ...interface{})
Debug implements Logger interface
func (*TestLogger) Debugf ¶
func (l *TestLogger) Debugf(format string, args ...interface{})
Debugf implements Logger interface
func (*TestLogger) Error ¶
func (l *TestLogger) Error(args ...interface{})
Error implements Logger interface
func (*TestLogger) Errorf ¶
func (l *TestLogger) Errorf(format string, args ...interface{})
Errorf implements Logger interface
func (*TestLogger) Errors ¶ added in v1.2.0
func (l *TestLogger) Errors() int
Errors returns the number of errors that have been logged
func (*TestLogger) Fatal ¶
func (l *TestLogger) Fatal(args ...interface{})
Fatal implements Logger interface
func (*TestLogger) Fatalf ¶
func (l *TestLogger) Fatalf(format string, args ...interface{})
Fatalf implements Logger interface
func (*TestLogger) Fatals ¶ added in v1.2.0
func (l *TestLogger) Fatals() int
Fatals returns the number of fatals that have been logged
func (*TestLogger) HasFailures ¶ added in v1.2.0
func (l *TestLogger) HasFailures() bool
HasFailures returns true if any errors, fatals, or panics have been logged
func (*TestLogger) Info ¶
func (l *TestLogger) Info(args ...interface{})
Info implements Logger interface
func (*TestLogger) Infof ¶
func (l *TestLogger) Infof(format string, args ...interface{})
Infof implements Logger interface
func (*TestLogger) Panic ¶
func (l *TestLogger) Panic(args ...interface{})
Panic implements Logger interface
func (*TestLogger) Panicf ¶
func (l *TestLogger) Panicf(format string, args ...interface{})
Panicf implements Logger interface
func (*TestLogger) Panics ¶ added in v1.2.0
func (l *TestLogger) Panics() int
Panics returns the number of panics that have been logged
func (*TestLogger) Print ¶
func (l *TestLogger) Print(args ...interface{})
Print implements Logger interface
func (*TestLogger) Printf ¶
func (l *TestLogger) Printf(format string, args ...interface{})
Printf implements Logger interface
func (*TestLogger) Println ¶
func (l *TestLogger) Println(args ...interface{})
Println implements Logger interface
func (*TestLogger) Warn ¶
func (l *TestLogger) Warn(args ...interface{})
Warn implements Logger interface
func (*TestLogger) Warnf ¶
func (l *TestLogger) Warnf(format string, args ...interface{})
Warnf implements Logger interface