diff --git a/routes/raw.go b/routes/raw.go index 15c183c..9de7cca 100644 --- a/routes/raw.go +++ b/routes/raw.go @@ -103,7 +103,10 @@ func Raw(c *gin.Context) { if ws.CheckLimitExceeded() { log.Warnf("[RAW] [%s] Account would exceed soft limits - DISABLED ACCOUNT: [%s]", res.Uuid, res.Username) accountManager.MarkDisabled(res.Username) - + } + counts := ws.RequestCounts() + if len(counts) > 0 { + log.Infof("[RAW] [%s] [%s] Account limits: %v", res.Uuid, res.Username, counts) } }() } diff --git a/worker/workerState.go b/worker/workerState.go index 6374cd8..7bd85b3 100644 --- a/worker/workerState.go +++ b/worker/workerState.go @@ -136,3 +136,7 @@ func (ws *State) IncrementLimit(method int) { func (ws *State) CheckLimitExceeded() bool { return ws.requestCounter.CheckLimitsExceeded() } + +func (ws *State) RequestCounts() map[int]int { + return ws.requestCounter.RequestCounts() +}