in mem logs & syslog

This commit is contained in:
Alireza Ahmadi
2023-07-30 16:29:49 +02:00
parent 49eedb7057
commit 59204cdb0c
4 changed files with 111 additions and 38 deletions

View File

@@ -118,11 +118,9 @@ func (a *ServerController) restartXrayService(c *gin.Context) {
func (a *ServerController) getLogs(c *gin.Context) {
count := c.Param("count")
logs, err := a.serverService.GetLogs(count)
if err != nil {
jsonMsg(c, "getLogs", err)
return
}
level := c.PostForm("level")
syslog := c.PostForm("syslog")
logs := a.serverService.GetLogs(count, level, syslog)
jsonObj(c, logs, nil)
}