From 7c230d542aac40abcb8fc99e679ba0df3d799cc5 Mon Sep 17 00:00:00 2001 From: Veda Depatla Date: Thu, 24 Oct 2019 20:26:37 -0700 Subject: [PATCH] replace fmt.sprintf (#12776) * replace fmt.sprintf * update error message * Update app/ldap.go Co-Authored-By: Jesse Hallam * Update app/ldap.go Co-Authored-By: Jesse Hallam --- app/ldap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ldap.go b/app/ldap.go index 5219ef8249..22a8568a68 100644 --- a/app/ldap.go +++ b/app/ldap.go @@ -52,7 +52,7 @@ func (a *App) GetLdapGroup(ldapGroupID string) (*model.Group, *model.AppError) { } } else { ae := model.NewAppError("GetLdapGroup", "ent.ldap.app_error", nil, "", http.StatusNotImplemented) - mlog.Error(fmt.Sprintf("%v", ae.Error())) + mlog.Error("Unable to use ldap", mlog.String("ldap_group_id", ldapGroupID), mlog.Err(ae)) return nil, ae } @@ -73,7 +73,7 @@ func (a *App) GetAllLdapGroupsPage(page int, perPage int, opts model.LdapGroupSe } } else { ae := model.NewAppError("GetAllLdapGroupsPage", "ent.ldap.app_error", nil, "", http.StatusNotImplemented) - mlog.Error(fmt.Sprintf("%v", ae.Error())) + mlog.Error("Unable to use ldap", mlog.Err(ae)) return nil, 0, ae }