Reduce usage of mlog.Any (#25180)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
73fba481ed
Коммит
274adbf077
@@ -1318,7 +1318,7 @@ func (a *App) importAttachment(c request.CTX, data *imports.AttachmentImportData
|
||||
oldHash := sha1.Sum(oldFileData)
|
||||
|
||||
if bytes.Equal(oldHash[:], newHash[:]) {
|
||||
mlog.Info("Skipping uploading of file because name already exists", mlog.Any("file_name", name))
|
||||
mlog.Info("Skipping uploading of file because name already exists", mlog.String("file_name", name))
|
||||
return oldFile, nil
|
||||
}
|
||||
}
|
||||
@@ -1645,7 +1645,7 @@ func (a *App) uploadAttachments(c request.CTX, attachments *[]imports.Attachment
|
||||
func (a *App) updateFileInfoWithPostId(post *model.Post) {
|
||||
for _, fileID := range post.FileIds {
|
||||
if err := a.Srv().Store().FileInfo().AttachToPost(fileID, post.Id, post.ChannelId, post.UserId); err != nil {
|
||||
mlog.Error("Error attaching files to post.", mlog.String("post_id", post.Id), mlog.Any("post_file_ids", post.FileIds), mlog.Err(err))
|
||||
mlog.Error("Error attaching files to post.", mlog.String("post_id", post.Id), mlog.Array("post_file_ids", post.FileIds), mlog.Err(err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ func (wc *WebConn) writePump() {
|
||||
|
||||
case <-authTicker.C:
|
||||
if wc.GetSessionToken() == "" {
|
||||
mlog.Debug("websocket.authTicker: did not authenticate", mlog.Any("ip_address", wc.WebSocket.RemoteAddr()))
|
||||
mlog.Debug("websocket.authTicker: did not authenticate", mlog.Stringer("ip_address", wc.WebSocket.RemoteAddr()))
|
||||
return
|
||||
}
|
||||
authTicker.Stop()
|
||||
|
||||
@@ -362,7 +362,7 @@ func (a *App) CreatePost(c request.CTX, post *model.Post, channel *model.Channel
|
||||
|
||||
if len(post.FileIds) > 0 {
|
||||
if err = a.attachFilesToPost(post); err != nil {
|
||||
c.Logger().Warn("Encountered error attaching files to post", mlog.String("post_id", post.Id), mlog.Any("file_ids", post.FileIds), mlog.Err(err))
|
||||
c.Logger().Warn("Encountered error attaching files to post", mlog.String("post_id", post.Id), mlog.Array("file_ids", post.FileIds), mlog.Err(err))
|
||||
}
|
||||
|
||||
if a.Metrics() != nil {
|
||||
|
||||
@@ -216,7 +216,7 @@ func (a *App) SyncSyncableRoles(syncableID string, syncableType model.GroupSynca
|
||||
a.Log().Info(
|
||||
fmt.Sprintf("Permitted admins for %s", syncableType),
|
||||
mlog.String(strings.ToLower(fmt.Sprintf("%s_id", syncableType)), syncableID),
|
||||
mlog.Any("permitted_admins", permittedAdmins),
|
||||
mlog.Array("permitted_admins", permittedAdmins),
|
||||
)
|
||||
|
||||
switch syncableType {
|
||||
|
||||
Ссылка в новой задаче
Block a user