feat(botfilter): add filterLogger.blocked

This commit is contained in:
hoelee committed 2026-06-19 16:47:00 +08:00
1 parent 184d253bdc
commit 03cf6f3840
1 file changed
+8
+8
View File
@@ -7,3 +7,11 @@ type filterLogger struct {
enabled bool
}
func (l filterLogger) blocked(ip, reason string, score int) {
if !l.enabled {
return
}
// This is intentionally opt-in. Logging every rejected request during a
// flood can become a second source of CPU and disk pressure.
log.Printf("botfilter[%s]: blocked client=%s reason=%q score=%d", l.name, ip, reason, score)
}