mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 13:10:22 +03:00
Avoid messages from go test output (#15601)
A lot of warning messages are printed in CI/CD failures generated by go test. Avoid that by requiring at least Error level for logging when doing go test.
This commit is contained in:
@@ -158,7 +158,7 @@ func (i infoMsg) json(msg string, args ...interface{}) {
|
||||
message = fmt.Sprint(args...)
|
||||
}
|
||||
logJSON, err := json.Marshal(&log.Entry{
|
||||
Level: InformationLvl.String(),
|
||||
Level: InfoLvl.String(),
|
||||
Message: message,
|
||||
Time: time.Now().UTC(),
|
||||
})
|
||||
@@ -214,10 +214,16 @@ func (i errorMsg) pretty(msg string, args ...interface{}) {
|
||||
|
||||
// Error :
|
||||
func Error(msg string, data ...interface{}) {
|
||||
if MinimumLogLevel > ErrorLvl {
|
||||
return
|
||||
}
|
||||
consoleLog(errorm, msg, data...)
|
||||
}
|
||||
|
||||
// Info :
|
||||
func Info(msg string, data ...interface{}) {
|
||||
if MinimumLogLevel > InfoLvl {
|
||||
return
|
||||
}
|
||||
consoleLog(info, msg, data...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user