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) Errorf(format string, args ...interface{})
- func (m *MockLog) Fatalf(format string, args ...interface{})
- func (m *MockLog) Infof(format string, args ...interface{})
- func (m *MockLog) Panicf(format string, args ...interface{})
- func (m *MockLog) SetLevel(level LogLevel)
- func (m *MockLog) Warnf(format string, args ...interface{})
- 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) Panicf(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()
Functions ¶
func HaveDebugTag ¶
func SetupVerboseLog ¶
Types ¶
type LogLevel ¶
type LogLevel int
const ( // Debug messages, 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 ¶
func NewMockLog ¶
func NewMockLog() *MockLog
type StderrLog ¶
type StderrLog struct {
// contains filtered or unexported fields
}
func NewStderrLog ¶
Click to show internal directories.
Click to hide internal directories.