improve logging
This commit is contained in:
@ -262,4 +262,37 @@ To reduce log spam during high-traffic scenarios or attacks, SmartProxy implemen
|
||||
- Provides better overview of patterns (e.g., which IPs are attacking)
|
||||
- Improves log readability and analysis
|
||||
- Prevents log storage overflow
|
||||
- Maintains detailed information in aggregated form
|
||||
- Maintains detailed information in aggregated form
|
||||
|
||||
### Log Output Examples
|
||||
|
||||
Instead of hundreds of individual logs:
|
||||
```
|
||||
Connection rejected
|
||||
Connection rejected
|
||||
Connection rejected
|
||||
... (repeated 500 times)
|
||||
```
|
||||
|
||||
You'll see:
|
||||
```
|
||||
[SUMMARY] Rejected 500 connections from 10 IPs in 5s (top offenders: 192.168.1.100 (200x, rate-limit), 10.0.0.1 (150x, per-ip-limit))
|
||||
```
|
||||
|
||||
Instead of:
|
||||
```
|
||||
Connection terminated: ::ffff:127.0.0.1 (client_closed). Active: 266
|
||||
Connection terminated: ::ffff:127.0.0.1 (client_closed). Active: 265
|
||||
... (repeated 266 times)
|
||||
```
|
||||
|
||||
You'll see:
|
||||
```
|
||||
[SUMMARY] 266 HttpProxy connections terminated in 5s (reasons: client_closed: 266, activeConnections: 0)
|
||||
```
|
||||
|
||||
### Rapid Event Handling
|
||||
- During attacks or high-volume scenarios, logs are flushed more frequently
|
||||
- If 50+ events occur within 1 second, immediate flush is triggered
|
||||
- Prevents memory buildup during flooding attacks
|
||||
- Maintains real-time visibility during incidents
|
Reference in New Issue
Block a user