importance as a number is silly, and section is implied by the context of the description
This commit is contained in:
parent
9ebe425520
commit
5f6a454734
@ -12,8 +12,9 @@ class LogNet extends Extension {
|
|||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
if($event->priority > 10) {
|
if($event->priority > 10) {
|
||||||
|
// TODO: colour based on event->priority
|
||||||
$username = ($user && $user->name) ? $user->name : "Anonymous";
|
$username = ($user && $user->name) ? $user->name : "Anonymous";
|
||||||
$str = sprintf("%2d %15s (%s): %s - %s", $event->priority, $_SERVER['REMOTE_ADDR'], $username, $event->section, $event->message);
|
$str = sprintf("%15s (%s): %s", $_SERVER['REMOTE_ADDR'], $username, $event->message);
|
||||||
system("echo ".escapeshellarg($str)." | nc -q 0 localhost 5000");
|
system("echo ".escapeshellarg($str)." | nc -q 0 localhost 5000");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user