Documentation ¶
Index ¶
- Variables
- func HaveDebugTag(tag string) bool
- func SetupVerboseLog(log Log, isVerbose bool)
- type DebugFunc
- type Log
- type LogLevel
- type MockLog
- func (_m *MockLog) Child(name string) Log
- func (_m *MockLog) EXPECT() *MockLogMockRecorder
- func (_m *MockLog) Errorf(format string, args ...interface{})
- func (_m *MockLog) Fatalf(format string, args ...interface{})
- func (_m *MockLog) Infof(format string, args ...interface{})
- func (_m *MockLog) SetLevel(level LogLevel)
- func (_m *MockLog) Warnf(format string, args ...interface{})
- type MockLogMockRecorder
- func (_mr *MockLogMockRecorder) Child(arg0 interface{}) *gomock.Call
- func (_mr *MockLogMockRecorder) Errorf(arg0 interface{}, arg1 ...interface{}) *gomock.Call
- func (_mr *MockLogMockRecorder) Fatalf(arg0 interface{}, arg1 ...interface{}) *gomock.Call
- func (_mr *MockLogMockRecorder) Infof(arg0 interface{}, arg1 ...interface{}) *gomock.Call
- func (_mr *MockLogMockRecorder) SetLevel(arg0 interface{}) *gomock.Call
- func (_mr *MockLogMockRecorder) Warnf(arg0 interface{}, arg1 ...interface{}) *gomock.Call
- type StderrLog
- func (sl StderrLog) Child(name string) Log
- func (sl StderrLog) Debugf(format string, args ...interface{})
- func (sl StderrLog) Errorf(format string, args ...interface{})
- func (sl StderrLog) Fatalf(format string, args ...interface{})
- func (sl StderrLog) Infof(format string, args ...interface{})
- func (sl *StderrLog) SetLevel(level LogLevel)
- func (sl StderrLog) Warnf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var StdErr = colorable.NewColorableStderr()
View Source
var StdOut = color.Output // https://github.com/golangci/golangci-lint/issues/14
Functions ¶
func HaveDebugTag ¶ added in v1.7.1
func SetupVerboseLog ¶ added in v1.7.1
Types ¶
type LogLevel ¶ added in v1.7.1
type LogLevel int
const ( // debug message, write to debug logs only by logutils.Debug LogLevelDebug LogLevel = 0 // information messages, don't write too much messages, // only useful ones: they are shown when running with -v LogLevelInfo LogLevel = 1 // hidden errors: non critical errors: work can be continued, no need to fail whole program; // tests will crash if any warning occurred. LogLevelWarn LogLevel = 2 // only not hidden from user errors: whole program failing, usually // error logging happens in 1-2 places: in the "main" function. LogLevelError LogLevel = 3 )
type MockLog ¶ added in v1.10.2
type MockLog struct {
// contains filtered or unexported fields
}
MockLog is a mock of Log interface
func NewMockLog ¶ added in v1.10.2
func NewMockLog(ctrl *gomock.Controller) *MockLog
NewMockLog creates a new mock instance
func (*MockLog) EXPECT ¶ added in v1.10.2
func (_m *MockLog) EXPECT() *MockLogMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockLogMockRecorder ¶ added in v1.10.2
type MockLogMockRecorder struct {
// contains filtered or unexported fields
}
MockLogMockRecorder is the mock recorder for MockLog
func (*MockLogMockRecorder) Child ¶ added in v1.10.2
func (_mr *MockLogMockRecorder) Child(arg0 interface{}) *gomock.Call
Child indicates an expected call of Child
func (*MockLogMockRecorder) Errorf ¶ added in v1.10.2
func (_mr *MockLogMockRecorder) Errorf(arg0 interface{}, arg1 ...interface{}) *gomock.Call
Errorf indicates an expected call of Errorf
func (*MockLogMockRecorder) Fatalf ¶ added in v1.10.2
func (_mr *MockLogMockRecorder) Fatalf(arg0 interface{}, arg1 ...interface{}) *gomock.Call
Fatalf indicates an expected call of Fatalf
func (*MockLogMockRecorder) Infof ¶ added in v1.10.2
func (_mr *MockLogMockRecorder) Infof(arg0 interface{}, arg1 ...interface{}) *gomock.Call
Infof indicates an expected call of Infof
func (*MockLogMockRecorder) SetLevel ¶ added in v1.10.2
func (_mr *MockLogMockRecorder) SetLevel(arg0 interface{}) *gomock.Call
SetLevel indicates an expected call of SetLevel
func (*MockLogMockRecorder) Warnf ¶ added in v1.10.2
func (_mr *MockLogMockRecorder) Warnf(arg0 interface{}, arg1 ...interface{}) *gomock.Call
Warnf indicates an expected call of Warnf
type StderrLog ¶ added in v1.7.1
type StderrLog struct {
// contains filtered or unexported fields
}
func NewStderrLog ¶ added in v1.7.1
Click to show internal directories.
Click to hide internal directories.