Do not send debug messages from logger event subscriber. Debug messages will be implemented later in a separate events' listener.

This commit is contained in:
ErickSkrauch 2020-04-04 00:36:56 +03:00
parent 767971a197
commit 0546b0519b
2 changed files with 1 additions and 7 deletions

View File

@ -50,8 +50,6 @@ func (l *Logger) createMojangTexturesErrorHandler(provider string) func(identity
errParam := wd.ErrParam(err) errParam := wd.ErrParam(err)
l.Debug("Mojang "+provider+" provider resulted an error :err", errParam)
switch err.(type) { switch err.(type) {
case *mojang.BadRequestError: case *mojang.BadRequestError:
l.logMojangTexturesWarning(providerParam, errParam) l.logMojangTexturesWarning(providerParam, errParam)

View File

@ -155,9 +155,7 @@ func init() {
{"mojang_textures:" + pn + ":after_call", pn, nil, &net.OpError{Op: "dial"}}, {"mojang_textures:" + pn + ":after_call", pn, nil, &net.OpError{Op: "dial"}},
{"mojang_textures:" + pn + ":after_call", pn, nil, syscall.ECONNREFUSED}, {"mojang_textures:" + pn + ":after_call", pn, nil, syscall.ECONNREFUSED},
}, },
ExpectedCalls: [][]interface{}{ ExpectedCalls: nil,
{"Debug", "Mojang " + pn + " provider resulted an error :err", mock.AnythingOfType("params.Error")},
},
} }
loggerTestCases["should log expected mojang errors for "+pn+" provider"] = &LoggerTestCase{ loggerTestCases["should log expected mojang errors for "+pn+" provider"] = &LoggerTestCase{
@ -170,7 +168,6 @@ func init() {
{"mojang_textures:" + pn + ":after_call", pn, nil, &mojang.TooManyRequestsError{}}, {"mojang_textures:" + pn + ":after_call", pn, nil, &mojang.TooManyRequestsError{}},
}, },
ExpectedCalls: [][]interface{}{ ExpectedCalls: [][]interface{}{
{"Debug", "Mojang " + pn + " provider resulted an error :err", mock.AnythingOfType("params.Error")},
{"Warning", {"Warning",
":name: :err", ":name: :err",
mock.MatchedBy(func(strParam params.String) bool { mock.MatchedBy(func(strParam params.String) bool {
@ -204,7 +201,6 @@ func init() {
{"mojang_textures:" + pn + ":after_call", pn, nil, &mojang.ServerError{Status: 500}}, {"mojang_textures:" + pn + ":after_call", pn, nil, &mojang.ServerError{Status: 500}},
}, },
ExpectedCalls: [][]interface{}{ ExpectedCalls: [][]interface{}{
{"Debug", "Mojang " + pn + " provider resulted an error :err", mock.AnythingOfType("params.Error")},
{"Error", {"Error",
":name: Unexpected Mojang response error: :err", ":name: Unexpected Mojang response error: :err",
mock.MatchedBy(func(strParam params.String) bool { mock.MatchedBy(func(strParam params.String) bool {