woodpecker/vendor/github.com/golangci/golangci-lint/pkg/logutils/log.go
6543 56a854fe14
Update deps (#789)
* update github.com/docker/cli

* update github.com/docker/distribution

* update github.com/docker/docker

* update github.com/gin-gonic/gin

* update github.com/golang-jwt/jwt/v4

* update github.com/golangci/golangci-lint

* update github.com/gorilla/securecookie

* update github.com/mattn/go-sqlite3

* update github.com/moby/moby

* update github.com/prometheus/client_golang

* update github.com/xanzy/go-gitlab
2022-02-24 17:33:24 +01:00

31 lines
907 B
Go

package logutils
type Log interface {
Fatalf(format string, args ...interface{})
Panicf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Warnf(format string, args ...interface{})
Infof(format string, args ...interface{})
Child(name string) Log
SetLevel(level LogLevel)
}
type LogLevel int
const (
// Debug messages, write to debug logs only by logutils.Debug.
LogLevelDebug LogLevel = 0
// Information messages, don't write too many 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
)