github.com/ldez/golangci-lint@v1.10.1/pkg/logutils/log.go (about)

     1  package logutils
     2  
     3  type Log interface {
     4  	Fatalf(format string, args ...interface{})
     5  	Errorf(format string, args ...interface{})
     6  	Warnf(format string, args ...interface{})
     7  	Infof(format string, args ...interface{})
     8  
     9  	Child(name string) Log
    10  	SetLevel(level LogLevel)
    11  }
    12  
    13  type LogLevel int
    14  
    15  const (
    16  	// debug message, write to debug logs only by logutils.Debug
    17  	LogLevelDebug LogLevel = 0
    18  
    19  	// information messages, don't write too much messages,
    20  	// only useful ones: they are shown when running with -v
    21  	LogLevelInfo LogLevel = 1
    22  
    23  	// hidden errors: non critical errors: work can be continued, no need to fail whole program;
    24  	// tests will crash if any warning occurred.
    25  	LogLevelWarn LogLevel = 2
    26  
    27  	// only not hidden from user errors: whole program failing, usually
    28  	// error logging happens in 1-2 places: in the "main" function.
    29  	LogLevelError LogLevel = 3
    30  )