Refactor "app/authorization.go" to use structured logging (#12233)

Этот коммит содержится в:
sowmiyamuthuraman
2019-09-18 23:32:22 +05:30
коммит произвёл Ben Schumacher
родитель c7b583ccdd
Коммит be0d13578d

Просмотреть файл

@@ -4,7 +4,6 @@
package app
import (
"fmt"
"net/http"
"strings"
@@ -192,8 +191,7 @@ func (a *App) RolesGrantPermission(roleNames []string, permissionId string) bool
if err != nil {
// This should only happen if something is very broken. We can't realistically
// recover the situation, so deny permission and log an error.
mlog.Error("Failed to get roles from database with role names: " + strings.Join(roleNames, ","))
mlog.Error(fmt.Sprint(err))
mlog.Error("Failed to get roles from database with role names: "+strings.Join(roleNames, ",")+" ", mlog.Err(err))
return false
}