Documentation
¶
Index ¶
- Constants
- type Fields
- type Formatter
- type Logger
- type MockFormatter
- type MockLogger
- func (_m *MockLogger) Debug(args ...interface{})
- func (_m *MockLogger) Debugf(format string, args ...interface{})
- func (_m *MockLogger) Error(args ...interface{})
- func (_m *MockLogger) Errorf(format string, args ...interface{})
- func (_m *MockLogger) Fatal(args ...interface{})
- func (_m *MockLogger) Fatalf(format string, args ...interface{})
- func (_m *MockLogger) Info(args ...interface{})
- func (_m *MockLogger) Infof(format string, args ...interface{})
- func (_m *MockLogger) Panic(args ...interface{})
- func (_m *MockLogger) Panicf(format string, args ...interface{})
- func (_m *MockLogger) Print(args ...interface{})
- func (_m *MockLogger) Printf(format string, args ...interface{})
- func (_m *MockLogger) SetFormat(logFormat string) error
- func (_m *MockLogger) SetLevel(level string) error
- func (_m *MockLogger) SetOutput(w io.Writer)
- func (_m *MockLogger) Warn(args ...interface{})
- func (_m *MockLogger) Warnf(format string, args ...interface{})
- func (_m *MockLogger) Warning(args ...interface{})
- func (_m *MockLogger) Warningf(format string, args ...interface{})
- func (_m *MockLogger) WithError(err error) Logger
- func (_m *MockLogger) WithField(key string, value interface{}) Logger
- func (_m *MockLogger) WithFields(fields logrus.Fields) Logger
Constants ¶
const ( FormatText = "text" FormatTextSimple = "text-simple" FormatJSON = "json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { WithField(key string, value interface{}) Logger WithFields(fields Fields) Logger WithError(err error) Logger Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Printf(format string, args ...interface{}) Warnf(format string, args ...interface{}) Warningf(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{}) Warn(args ...interface{}) Warning(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Panic(args ...interface{}) SetLevel(level string) error SetFormat(logFormat string) error SetOutput(w io.Writer) }
type MockFormatter ¶ added in v0.5.2
MockFormatter is an autogenerated mock type for the Formatter type
func NewMockFormatter ¶ added in v0.5.2
func NewMockFormatter(t interface { mock.TestingT Cleanup(func()) }) *MockFormatter
NewMockFormatter creates a new instance of MockFormatter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
type MockLogger ¶
MockLogger is an autogenerated mock type for the Logger type
func NewMockLogger ¶ added in v0.3.0
func NewMockLogger(t interface { mock.TestingT Cleanup(func()) }) *MockLogger
NewMockLogger creates a new instance of MockLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockLogger) Debug ¶
func (_m *MockLogger) Debug(args ...interface{})
Debug provides a mock function with given fields: args
func (*MockLogger) Debugf ¶
func (_m *MockLogger) Debugf(format string, args ...interface{})
Debugf provides a mock function with given fields: format, args
func (*MockLogger) Error ¶
func (_m *MockLogger) Error(args ...interface{})
Error provides a mock function with given fields: args
func (*MockLogger) Errorf ¶
func (_m *MockLogger) Errorf(format string, args ...interface{})
Errorf provides a mock function with given fields: format, args
func (*MockLogger) Fatal ¶
func (_m *MockLogger) Fatal(args ...interface{})
Fatal provides a mock function with given fields: args
func (*MockLogger) Fatalf ¶
func (_m *MockLogger) Fatalf(format string, args ...interface{})
Fatalf provides a mock function with given fields: format, args
func (*MockLogger) Info ¶
func (_m *MockLogger) Info(args ...interface{})
Info provides a mock function with given fields: args
func (*MockLogger) Infof ¶
func (_m *MockLogger) Infof(format string, args ...interface{})
Infof provides a mock function with given fields: format, args
func (*MockLogger) Panic ¶
func (_m *MockLogger) Panic(args ...interface{})
Panic provides a mock function with given fields: args
func (*MockLogger) Panicf ¶
func (_m *MockLogger) Panicf(format string, args ...interface{})
Panicf provides a mock function with given fields: format, args
func (*MockLogger) Print ¶
func (_m *MockLogger) Print(args ...interface{})
Print provides a mock function with given fields: args
func (*MockLogger) Printf ¶
func (_m *MockLogger) Printf(format string, args ...interface{})
Printf provides a mock function with given fields: format, args
func (*MockLogger) SetFormat ¶
func (_m *MockLogger) SetFormat(logFormat string) error
SetFormat provides a mock function with given fields: logFormat
func (*MockLogger) SetLevel ¶
func (_m *MockLogger) SetLevel(level string) error
SetLevel provides a mock function with given fields: level
func (*MockLogger) SetOutput ¶
func (_m *MockLogger) SetOutput(w io.Writer)
SetOutput provides a mock function with given fields: w
func (*MockLogger) Warn ¶
func (_m *MockLogger) Warn(args ...interface{})
Warn provides a mock function with given fields: args
func (*MockLogger) Warnf ¶
func (_m *MockLogger) Warnf(format string, args ...interface{})
Warnf provides a mock function with given fields: format, args
func (*MockLogger) Warning ¶
func (_m *MockLogger) Warning(args ...interface{})
Warning provides a mock function with given fields: args
func (*MockLogger) Warningf ¶
func (_m *MockLogger) Warningf(format string, args ...interface{})
Warningf provides a mock function with given fields: format, args
func (*MockLogger) WithError ¶
func (_m *MockLogger) WithError(err error) Logger
WithError provides a mock function with given fields: err
func (*MockLogger) WithField ¶
func (_m *MockLogger) WithField(key string, value interface{}) Logger
WithField provides a mock function with given fields: key, value
func (*MockLogger) WithFields ¶
func (_m *MockLogger) WithFields(fields logrus.Fields) Logger
WithFields provides a mock function with given fields: fields