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)
l.Debug("Mojang "+provider+" provider resulted an error :err", errParam)
switch err.(type) {
case *mojang.BadRequestError:
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, syscall.ECONNREFUSED},
},
ExpectedCalls: [][]interface{}{
{"Debug", "Mojang " + pn + " provider resulted an error :err", mock.AnythingOfType("params.Error")},
},
ExpectedCalls: nil,
}
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{}},
},
ExpectedCalls: [][]interface{}{
{"Debug", "Mojang " + pn + " provider resulted an error :err", mock.AnythingOfType("params.Error")},
{"Warning",
":name: :err",
mock.MatchedBy(func(strParam params.String) bool {
@ -204,7 +201,6 @@ func init() {
{"mojang_textures:" + pn + ":after_call", pn, nil, &mojang.ServerError{Status: 500}},
},
ExpectedCalls: [][]interface{}{
{"Debug", "Mojang " + pn + " provider resulted an error :err", mock.AnythingOfType("params.Error")},
{"Error",
":name: Unexpected Mojang response error: :err",
mock.MatchedBy(func(strParam params.String) bool {