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()
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 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 ¶ added in v1.26.1
func NewMockLog ¶ added in v1.26.1
func NewMockLog() *MockLog
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.