do not log multiple times due to pushing log-handlers multiple times
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -40,6 +40,13 @@ class FroxlorLogger
|
||||
*/
|
||||
private static $userinfo = array();
|
||||
|
||||
/**
|
||||
* whether the logger object has already been initialized
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private static $is_initialized = false;
|
||||
|
||||
const USR_ACTION = '10';
|
||||
|
||||
const RES_ACTION = '20';
|
||||
@@ -72,6 +79,7 @@ class FroxlorLogger
|
||||
}
|
||||
}
|
||||
|
||||
if (self::$is_initialized == false) {
|
||||
foreach (self::$logtypes as $logger) {
|
||||
|
||||
switch ($logger) {
|
||||
@@ -86,6 +94,8 @@ class FroxlorLogger
|
||||
break;
|
||||
}
|
||||
}
|
||||
self::$is_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user