改进一个日志细节

This commit is contained in:
GoEdgeLab
2020-12-23 21:33:24 +08:00
parent 119882b6d7
commit 89506a15c0
2 changed files with 6 additions and 6 deletions

View File

@@ -57,6 +57,9 @@ func (this *PreheatAction) RunPost(params struct {
Must *actions.Must
}) {
// 创建日志
defer this.CreateLog(oplogs.LevelInfo, "预热缓存,缓存策略:%d", params.CachePolicyId)
// 记录clusterId
this.AddCookie(&http.Cookie{
Name: "cache_cluster_id",
@@ -111,8 +114,5 @@ func (this *PreheatAction) RunPost(params struct {
this.Data["isAllOk"] = isAllOk
this.Data["results"] = results
// 创建日志
defer this.CreateLog(oplogs.LevelInfo, "预热缓存,缓存策略:%d", params.CachePolicyId)
this.Success()
}

View File

@@ -56,6 +56,9 @@ func (this *PurgeAction) RunPost(params struct {
Keys string
Must *actions.Must
}) {
// 创建日志
defer this.CreateLog(oplogs.LevelInfo, "删除缓存,缓存策略:%d", params.CachePolicyId)
// 记录clusterId
this.AddCookie(&http.Cookie{
Name: "cache_cluster_id",
@@ -110,8 +113,5 @@ func (this *PurgeAction) RunPost(params struct {
this.Data["isAllOk"] = isAllOk
this.Data["results"] = results
// 创建日志
defer this.CreateLog(oplogs.LevelInfo, "删除缓存,缓存策略:%d", params.CachePolicyId)
this.Success()
}