Potential fix for console becoming unresponsive (#55)

* Potentially fix console logs not being pulled after a server has been running for a while

* Add container_id to resource polling debug logs
This commit is contained in:
Matthew Penner
2020-09-07 14:04:56 -06:00
committed by GitHub
parent 7ba32aca84
commit a81146d730
5 changed files with 31 additions and 44 deletions

View File

@@ -31,9 +31,11 @@ func getServer(c *gin.Context) {
func getServerLogs(c *gin.Context) {
s := GetServer(c.Param("server"))
l, _ := strconv.ParseInt(c.DefaultQuery("size", "8192"), 10, 64)
l, _ := strconv.Atoi(c.DefaultQuery("size", "100"))
if l <= 0 {
l = 2048
l = 100
} else if l > 100 {
l = 100
}
out, err := s.ReadLogfile(l)