1
0

some debbuging

This commit is contained in:
2022-01-02 18:14:13 +01:00
parent 2e6b2fe5cb
commit d79463fbd4
11 changed files with 147 additions and 242 deletions

View File

@ -12,6 +12,8 @@ function signalHandler($signal)
function notify($message)
{
global $notificationMethods;
$result = false;
foreach($notificationMethods as $value)
{
$result |= $value->send($message);
@ -21,7 +23,8 @@ function notify($message)
function logger($level, $log)
{
global $logFh, $logLevel;
global $logFh, $logLevel, $notificationLevel;
echo "$level"
if ( $level >= $logLevel)
{
fwrite($logFh, "$level : $log" . EOL);
@ -29,9 +32,9 @@ function logger($level, $log)
}
if ($level >= $notificationLevel)
{
if(notify($message) == true)
if(notify(" Moha\n" . $log) == false)
{
logger(INFO, __("Notification not sent"));
logger(INFO, _("Notification not sent"));
}
}
}