[MM-55480] Update logr to v2.0.21 (#25431)

Этот коммит содержится в:
Ben Schumacher
2023-11-23 10:30:08 +01:00
коммит произвёл GitHub
родитель 7848ea8e19
Коммит e99ded1635
34 изменённых файлов: 115 добавлений и 109 удалений

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

@@ -101,7 +101,7 @@ func (awsm *AwsMeter) GetUserCategoryUsage(dimensions []string, startTime time.T
case model.AwsMeteringDimensionUsageHrs:
userCount, err = awsm.store.User().AnalyticsActiveCountForPeriod(model.GetMillisForTime(startTime), model.GetMillisForTime(endTime), model.UserCountOptions{})
if err != nil {
mlog.Warn("Failed to obtain usage data", mlog.String("dimension", dimension), mlog.String("start", startTime.String()), mlog.Int64("count", userCount), mlog.Err(err))
mlog.Warn("Failed to obtain usage data", mlog.String("dimension", dimension), mlog.Time("start", startTime), mlog.Int("count", userCount), mlog.Err(err))
continue
}
default:
@@ -148,7 +148,7 @@ func sendReportToMeteringService(ams *AWSMeterService, report *AWSMeterReport) e
return errors.Wrap(err, "Invalid metering service id.")
}
mlog.Debug("Sent record to AWS metering service", mlog.String("dimension", report.Dimension), mlog.Int64("value", report.Value), mlog.String("timestamp", report.Timestamp.String()))
mlog.Debug("Sent record to AWS metering service", mlog.String("dimension", report.Dimension), mlog.Int("value", report.Value), mlog.String("timestamp", report.Timestamp.String()))
return nil
}

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

@@ -135,9 +135,9 @@ func (rcs *Service) pingRemote(rc *model.RemoteCluster) error {
rcs.server.Log().Log(mlog.LvlRemoteClusterServiceDebug, "Remote cluster ping",
mlog.String("remote", rc.DisplayName),
mlog.String("remoteId", rc.RemoteId),
mlog.Int64("SentAt", ping.SentAt),
mlog.Int64("RecvAt", ping.RecvAt),
mlog.Int64("Diff", ping.RecvAt-ping.SentAt),
mlog.Int("SentAt", ping.SentAt),
mlog.Int("RecvAt", ping.RecvAt),
mlog.Int("Diff", ping.RecvAt-ping.SentAt),
)
return nil
}

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

@@ -269,7 +269,7 @@ func (b *BleveEngine) DeleteChannelPosts(channelID string) *model.AppError {
err.Error(), http.StatusInternalServerError)
}
mlog.Info("Posts for channel deleted", mlog.String("channel_id", channelID), mlog.Int64("deleted", deleted))
mlog.Info("Posts for channel deleted", mlog.String("channel_id", channelID), mlog.Int("deleted", deleted))
return nil
}
@@ -288,7 +288,7 @@ func (b *BleveEngine) DeleteUserPosts(userID string) *model.AppError {
err.Error(), http.StatusInternalServerError)
}
mlog.Info("Posts for user deleted", mlog.String("user_id", userID), mlog.Int64("deleted", deleted))
mlog.Info("Posts for user deleted", mlog.String("user_id", userID), mlog.Int("deleted", deleted))
return nil
}
@@ -832,7 +832,7 @@ func (b *BleveEngine) DeleteUserFiles(userID string) *model.AppError {
err.Error(), http.StatusInternalServerError)
}
mlog.Info("Files for user deleted", mlog.String("user_id", userID), mlog.Int64("deleted", deleted))
mlog.Info("Files for user deleted", mlog.String("user_id", userID), mlog.Int("deleted", deleted))
return nil
}
@@ -851,7 +851,7 @@ func (b *BleveEngine) DeletePostFiles(postID string) *model.AppError {
err.Error(), http.StatusInternalServerError)
}
mlog.Info("Files for post deleted", mlog.String("post_id", postID), mlog.Int64("deleted", deleted))
mlog.Info("Files for post deleted", mlog.String("post_id", postID), mlog.Int("deleted", deleted))
return nil
}
@@ -873,7 +873,7 @@ func (b *BleveEngine) DeleteFilesBatch(endTime, limit int64) *model.AppError {
err.Error(), http.StatusInternalServerError)
}
mlog.Info("Files in batch deleted", mlog.Int64("endTime", endTime), mlog.Int64("limit", limit), mlog.Int64("deleted", deleted))
mlog.Info("Files in batch deleted", mlog.Int("endTime", endTime), mlog.Int("limit", limit), mlog.Int("deleted", deleted))
return nil
}

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

@@ -29,7 +29,7 @@ func (scs *Service) onReceiveSyncMessage(msg model.RemoteClusterMsg, rc *model.R
if scs.server.Log().IsLevelEnabled(mlog.LvlSharedChannelServiceMessagesInbound) {
scs.server.Log().Log(mlog.LvlSharedChannelServiceMessagesInbound, "inbound message",
mlog.String("remote", rc.DisplayName),
mlog.String("msg", string(msg.Payload)),
mlog.String("msg", msg.Payload),
)
}
@@ -142,7 +142,7 @@ func (scs *Service) processSyncMessage(c request.CTX, syncMsg *syncMsg, rc *mode
mlog.String("user_id", reaction.UserId),
mlog.String("post_id", reaction.PostId),
mlog.String("emoji", reaction.EmojiName),
mlog.Int64("delete_at", reaction.DeleteAt),
mlog.Int("delete_at", reaction.DeleteAt),
mlog.Err(err),
)
} else {
@@ -151,7 +151,7 @@ func (scs *Service) processSyncMessage(c request.CTX, syncMsg *syncMsg, rc *mode
mlog.String("user_id", reaction.UserId),
mlog.String("post_id", reaction.PostId),
mlog.String("emoji", reaction.EmojiName),
mlog.Int64("delete_at", reaction.DeleteAt),
mlog.Int("delete_at", reaction.DeleteAt),
)
if syncResp.ReactionsLastUpdateAt < reaction.UpdateAt {

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

@@ -349,7 +349,7 @@ func (scs *Service) updateCursorForRemote(scrId string, rc *model.RemoteCluster,
scs.server.Log().Log(mlog.LvlSharedChannelServiceDebug, "updated cursor for remote",
mlog.String("remote_id", rc.RemoteId),
mlog.String("remote", rc.DisplayName),
mlog.Int64("last_post_update_at", cursor.LastPostUpdateAt),
mlog.Int("last_post_update_at", cursor.LastPostUpdateAt),
mlog.String("last_post_id", cursor.LastPostId),
)
}

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

@@ -208,7 +208,7 @@ func UpgradeToE0() error {
os.Remove(filename)
}
setUpgradeError(fmt.Errorf("error downloading the new Mattermost server binary file (percentage: %d)", getUpgradePercentage()))
mlog.Error("Unable to download the Mattermost server binary file", mlog.Int64("percentage", getUpgradePercentage()), mlog.String("url", getCurrentVersionTgzURL()), mlog.Err(err))
mlog.Error("Unable to download the Mattermost server binary file", mlog.Int("percentage", getUpgradePercentage()), mlog.String("url", getCurrentVersionTgzURL()), mlog.Err(err))
setUpgradePercentage(0)
return err
}