change log to logrus

This commit is contained in:
yuzuki999
2023-06-30 11:07:27 +08:00
parent 07b7ec9b3e
commit 65629c0dfb
9 changed files with 105 additions and 59 deletions

View File

@@ -1,14 +1,16 @@
package limiter
import "log"
import log "github.com/sirupsen/logrus"
func ClearOnlineIP() error {
log.Println("Limiter: Clear online ip...")
log.WithField("Type", "Limiter").
Debug("Clear online ip...")
limitLock.RLock()
for _, l := range limiter {
l.ConnLimiter.ClearOnlineIP()
}
limitLock.RUnlock()
log.Println("Limiter: Clear online ip done")
log.WithField("Type", "Limiter").
Debug("Clear online ip done")
return nil
}