dev: reference all the debug keys and env vars (#3196)

This commit is contained in:
Ludovic Fernandez 2022-09-06 13:48:25 +02:00 committed by GitHub
parent 091d2f4324
commit 19a338706a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 169 additions and 76 deletions

View file

@ -14,18 +14,18 @@ type Log interface {
type LogLevel int
const (
// Debug messages, write to debug logs only by logutils.Debug.
// LogLevelDebug Debug messages, write to debug logs only by logutils.Debug.
LogLevelDebug LogLevel = 0
// Information messages, don't write too many messages,
// LogLevelInfo 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;
// LogLevelWarn 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
// LogLevelError Only not hidden from user errors: whole program failing, usually
// error logging happens in 1-2 places: in the "main" function.
LogLevelError LogLevel = 3
)