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

feat: 应用支持实时日志

This commit is contained in:
耗子
2024-10-21 01:33:13 +08:00
parent 5ae6135429
commit 730aea037c
15 changed files with 21 additions and 234 deletions

View File

@@ -132,8 +132,7 @@ func (s *Service) Load(w http.ResponseWriter, r *http.Request) {
// Log 获取日志
func (s *Service) Log(w http.ResponseWriter, r *http.Request) {
log, _ := shell.Execf("tail -n 100 %s/server/postgresql/logs/postgresql-%s.log", app.Root, time.Now().Format(time.DateOnly))
service.Success(w, log)
service.Success(w, fmt.Sprintf("%s/server/postgresql/logs/postgresql-%s.log", app.Root, time.Now().Format(time.DateOnly)))
}
// ClearLog 清空日志