mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-18 14:50:26 +08:00
改进一个日志细节
This commit is contained in:
@@ -57,6 +57,9 @@ func (this *PreheatAction) RunPost(params struct {
|
|||||||
|
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
}) {
|
}) {
|
||||||
|
// 创建日志
|
||||||
|
defer this.CreateLog(oplogs.LevelInfo, "预热缓存,缓存策略:%d", params.CachePolicyId)
|
||||||
|
|
||||||
// 记录clusterId
|
// 记录clusterId
|
||||||
this.AddCookie(&http.Cookie{
|
this.AddCookie(&http.Cookie{
|
||||||
Name: "cache_cluster_id",
|
Name: "cache_cluster_id",
|
||||||
@@ -111,8 +114,5 @@ func (this *PreheatAction) RunPost(params struct {
|
|||||||
this.Data["isAllOk"] = isAllOk
|
this.Data["isAllOk"] = isAllOk
|
||||||
this.Data["results"] = results
|
this.Data["results"] = results
|
||||||
|
|
||||||
// 创建日志
|
|
||||||
defer this.CreateLog(oplogs.LevelInfo, "预热缓存,缓存策略:%d", params.CachePolicyId)
|
|
||||||
|
|
||||||
this.Success()
|
this.Success()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ func (this *PurgeAction) RunPost(params struct {
|
|||||||
Keys string
|
Keys string
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
}) {
|
}) {
|
||||||
|
// 创建日志
|
||||||
|
defer this.CreateLog(oplogs.LevelInfo, "删除缓存,缓存策略:%d", params.CachePolicyId)
|
||||||
|
|
||||||
// 记录clusterId
|
// 记录clusterId
|
||||||
this.AddCookie(&http.Cookie{
|
this.AddCookie(&http.Cookie{
|
||||||
Name: "cache_cluster_id",
|
Name: "cache_cluster_id",
|
||||||
@@ -110,8 +113,5 @@ func (this *PurgeAction) RunPost(params struct {
|
|||||||
this.Data["isAllOk"] = isAllOk
|
this.Data["isAllOk"] = isAllOk
|
||||||
this.Data["results"] = results
|
this.Data["results"] = results
|
||||||
|
|
||||||
// 创建日志
|
|
||||||
defer this.CreateLog(oplogs.LevelInfo, "删除缓存,缓存策略:%d", params.CachePolicyId)
|
|
||||||
|
|
||||||
this.Success()
|
this.Success()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user