From be0d13578dad9f374e035e1230b934cf5685b1e1 Mon Sep 17 00:00:00 2001 From: sowmiyamuthuraman <32141844+sowmiyamuthuraman@users.noreply.github.com> Date: Wed, 18 Sep 2019 23:32:22 +0530 Subject: [PATCH] Refactor "app/authorization.go" to use structured logging (#12233) --- app/authorization.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/authorization.go b/app/authorization.go index 995cc9e3bb..de1fc96e74 100644 --- a/app/authorization.go +++ b/app/authorization.go @@ -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 }