set defaults for log_net / log_logstash
This commit is contained in:
parent
45704f1775
commit
b5bbff531c
2 changed files with 13 additions and 1 deletions
|
@ -6,6 +6,12 @@ namespace Shimmie2;
|
|||
|
||||
class LogLogstash extends Extension
|
||||
{
|
||||
public function onInitExt(InitExtEvent $event)
|
||||
{
|
||||
global $config;
|
||||
$config->set_default_string("log_logstash_host", "127.0.0.1:1234");
|
||||
}
|
||||
|
||||
public function onLog(LogEvent $event)
|
||||
{
|
||||
global $user;
|
||||
|
|
|
@ -8,6 +8,12 @@ class LogNet extends Extension
|
|||
{
|
||||
private int $count = 0;
|
||||
|
||||
public function onInitExt(InitExtEvent $event)
|
||||
{
|
||||
global $config;
|
||||
$config->set_default_string("log_net_host", "127.0.0.1:35353");
|
||||
}
|
||||
|
||||
public function onLog(LogEvent $event)
|
||||
{
|
||||
global $user;
|
||||
|
@ -28,7 +34,7 @@ class LogNet extends Extension
|
|||
private function msg($data)
|
||||
{
|
||||
global $config;
|
||||
$host = $config->get_string("log_net_host", "127.0.0.1:35353");
|
||||
$host = $config->get_string("log_net_host");
|
||||
|
||||
if (!$host) {
|
||||
return;
|
||||
|
|
Reference in a new issue