mirror of
https://github.com/minio/minio.git
synced 2025-11-29 05:19:03 -05:00
logs: Do not log common successful errors. (#3340)
Errors like `BucketNotFound`, `BucketExists` shouldn't be logged. Fixes #3229
This commit is contained in:
@@ -25,13 +25,13 @@ import (
|
||||
"github.com/Sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Tests callerLocation.
|
||||
func TestCallerLocation(t *testing.T) {
|
||||
currentLocation := func() string { return callerLocation() }
|
||||
gotLocation := currentLocation()
|
||||
expectedLocation := "[logger_test.go:31:TestCallerLocation()]"
|
||||
if gotLocation != expectedLocation {
|
||||
t.Errorf("expected : %s, got : %s", expectedLocation, gotLocation)
|
||||
// Tests callerSource.
|
||||
func TestCallerSource(t *testing.T) {
|
||||
currentSource := func() string { return callerSource() }
|
||||
gotSource := currentSource()
|
||||
expectedSource := "[logger_test.go:31:TestCallerSource()]"
|
||||
if gotSource != expectedSource {
|
||||
t.Errorf("expected : %s, got : %s", expectedSource, gotSource)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user