Refactor "app/export.go" to use structured logging #12727 (#12729)

* Refactor "app/export.go" to use structured logging #12727

* use mlog.String

* use mlog.Bool, mlog.string needs 2 values?

* Update export.go

* s/reaction_UserId/user_id
Этот коммит содержится в:
Arjit Chaudhary
2019-10-16 03:01:46 +05:30
коммит произвёл Ali Farooq
родитель ad474cb0d9
Коммит 1a2197ec8e

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

@@ -5,7 +5,6 @@ package app
import ( import (
"encoding/json" "encoding/json"
"fmt"
"io" "io"
"net/http" "net/http"
"os" "os"
@@ -414,7 +413,7 @@ func (a *App) BuildPostReactions(postId string) (*[]ReactionImportData, *model.A
user, err = a.Srv.Store.User().Get(reaction.UserId) user, err = a.Srv.Store.User().Get(reaction.UserId)
if err != nil { if err != nil {
if err.Id == store.MISSING_ACCOUNT_ERROR { // this is a valid case, the user that reacted might've been deleted by now if err.Id == store.MISSING_ACCOUNT_ERROR { // this is a valid case, the user that reacted might've been deleted by now
mlog.Info(fmt.Sprintf("Skipping reactions by user %v, since the entity doesn't exist anymore", reaction.UserId)) mlog.Info("Skipping reactions by user since the entity doesn't exist anymore", mlog.String("user_id", reaction.UserId))
continue continue
} }
return nil, err return nil, err