suppress the flood of 'suppressing flood' messages...
This commit is contained in:
parent
d1e8bfb749
commit
e4e95a3a85
1 changed files with 11 additions and 9 deletions
|
@ -13,7 +13,8 @@ class LogNet extends Extension {
|
|||
public function onLog(LogEvent $event) {
|
||||
global $user;
|
||||
|
||||
if($this->count < 10 && $event->priority > 10) {
|
||||
if($event->priority > 10) {
|
||||
if($this->count < 10) {
|
||||
// TODO: colour based on event->priority
|
||||
$username = ($user && $user->name) ? $user->name : "Anonymous";
|
||||
$str = sprintf("%-15s %-10s: %s", $_SERVER['REMOTE_ADDR'], $username, $event->message);
|
||||
|
@ -25,4 +26,5 @@ class LogNet extends Extension {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Reference in a new issue