2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 09:13:49 +08:00

feat: 容器日志只取最新100行

This commit is contained in:
2025-04-14 19:02:35 +08:00
parent 044b3664ed
commit d39b3f66d6

View File

@@ -200,7 +200,7 @@ func (r *containerRepo) Rename(id string, newName string) error {
// Logs 查看容器日志
func (r *containerRepo) Logs(id string) (string, error) {
return shell.ExecfWithTimeout(2*time.Minute, "docker logs %s", id)
return shell.ExecfWithTimeout(2*time.Minute, "docker logs --tail 100 %s", id)
}
// Prune 清理未使用的容器