mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
N°5906 - CRUD Event - fire event EVENT_DB_LINKS_CHANGED when an n-n link is created/updated/deleted
This commit is contained in:
@@ -8,38 +8,8 @@ namespace Combodo\iTop\Service\Events;
|
||||
|
||||
use IssueLog;
|
||||
use LogChannels;
|
||||
use utils;
|
||||
|
||||
class EventServiceLog extends IssueLog
|
||||
{
|
||||
const CHANNEL_DEFAULT = LogChannels::EVENT_SERVICE;
|
||||
|
||||
/**
|
||||
* @param $sMessage
|
||||
* @param $sEvent
|
||||
* @param $sources
|
||||
*
|
||||
* @return void
|
||||
* @throws \ConfigException
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public static function DebugEvent($sMessage, $sEvent, $sources)
|
||||
{
|
||||
$oConfig = utils::GetConfig();
|
||||
$aLogEvents = $oConfig->Get('event_service.debug.filter_events');
|
||||
$aLogSources = $oConfig->Get('event_service.debug.filter_sources');
|
||||
|
||||
if (is_array($aLogEvents)) {
|
||||
if (!in_array($sEvent, $aLogEvents)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (is_array($aLogSources)) {
|
||||
if (!EventHelper::MatchEventSource($aLogSources, $sources)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
static::Debug($sMessage);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user