From 1f9d14e24c0b58511dd02872c08a4ac3f5dff958 Mon Sep 17 00:00:00 2001 From: Ogundele Olumide Date: Tue, 24 Sep 2019 17:30:23 +0100 Subject: [PATCH] chore: refactor to use structured logging (#12256) --- app/command.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/command.go b/app/command.go index 0d44b5dd1c..c7f83c5b1e 100644 --- a/app/command.go +++ b/app/command.go @@ -158,7 +158,7 @@ func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, * clientTriggerId, triggerId, appErr := model.GenerateTriggerId(args.UserId, a.AsymmetricSigningKey()) if appErr != nil { - mlog.Error(appErr.Error()) + mlog.Error("error occurred in generating trigger Id for a user ", mlog.Err(appErr)) } args.TriggerId = triggerId @@ -362,7 +362,7 @@ func (a *App) HandleCommandResponse(command *model.Command, args *model.CommandA _, err := a.HandleCommandResponsePost(command, args, response, builtIn) if err != nil { - mlog.Error(err.Error()) + mlog.Error("error occurred in handling command response post", mlog.Err(err)) lastError = err } @@ -371,7 +371,7 @@ func (a *App) HandleCommandResponse(command *model.Command, args *model.CommandA _, err := a.HandleCommandResponsePost(command, args, resp, builtIn) if err != nil { - mlog.Error(err.Error()) + mlog.Error("error occurred in handling command response post", mlog.Err(err)) lastError = err } }