some debbuging
This commit is contained in:
@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user