mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 16:10:59 +08:00
feat: 日志只读取 1000 行
This commit is contained in:
@@ -273,5 +273,7 @@ func (c *CronController) Log(ctx http.Context) http.Response {
|
||||
return Error(ctx, http.StatusUnprocessableEntity, "日志文件不存在")
|
||||
}
|
||||
|
||||
return Success(ctx, tools.Read(cron.Log))
|
||||
log := tools.Exec("tail -n 1000 " + cron.Log)
|
||||
|
||||
return Success(ctx, log)
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ func (r *TaskController) Log(ctx http.Context) http.Response {
|
||||
return Error(ctx, http.StatusInternalServerError, "系统内部错误")
|
||||
}
|
||||
|
||||
log := tools.Read(task.Log)
|
||||
log := tools.Exec("tail -n 1000 " + task.Log)
|
||||
|
||||
return Success(ctx, log)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user