From d9a154fc70b39acc7121bdd487f9a81131de1f8f Mon Sep 17 00:00:00 2001 From: Arjit Chaudhary Date: Sun, 10 Nov 2019 01:00:45 +0800 Subject: [PATCH] Refactor "app/notification_email.go" to use structured logging #12726 (#12731) * Refactor "app/notification_email.go" to use structured logging #12726 * Update notification_email.go * Update notification_email.go * Update notification_email.go * add back fmt as fmt.Sprintf calls are used for Year/Day/Minute * Update notification_email.go * Update notification_email.go * Update notification_email.go --- app/notification_email.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/notification_email.go b/app/notification_email.go index cdd7ae7ef9..20af2a7fe3 100644 --- a/app/notification_email.go +++ b/app/notification_email.go @@ -100,7 +100,7 @@ func (a *App) sendNotificationEmail(notification *postNotification, user *model. a.Srv.Go(func() { if err := a.SendNotificationMail(user.Email, html.UnescapeString(subjectText), bodyText); err != nil { - mlog.Error("Error while sending the email", mlog.String("email", user.Email), mlog.Err(err)) + mlog.Error("Error while sending the email", mlog.String("user_email", user.Email), mlog.Err(err)) } }) @@ -285,7 +285,7 @@ func getFormattedPostTime(user *model.User, post *model.Post, useMilitaryTime bo func (a *App) generateHyperlinkForChannels(postMessage, teamName, teamURL string) string { team, err := a.GetTeamByName(teamName) if err != nil { - mlog.Error("Encountered error while looking up team by name", mlog.String("Team Name", teamName), mlog.Err(err)) + mlog.Error("Encountered error while looking up team by name", mlog.String("team_name", teamName), mlog.Err(err)) return postMessage }