Documentation ¶
Index ¶
- Variables
- func HaveDebugTag(tag string) bool
- func SetupVerboseLog(log Log, isVerbose bool)
- type DebugFunc
- type Log
- type LogLevel
- 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 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.