logs: Do not log common successful errors. (#3340)

Errors like `BucketNotFound`, `BucketExists` shouldn't be logged.

Fixes #3229
This commit is contained in:
Harshavardhana
2016-11-23 16:36:26 -08:00
committed by GitHub
parent c667d20dfc
commit d711ff454e
9 changed files with 93 additions and 75 deletions

View File

@@ -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)
}
}