getSystemLogID(); $object_class = $object->getClassName(); $event = sanitise_string($event); $time = time(); // Create log return insert_data("INSERT into {$CONFIG->dbprefix}system_log (object_id, object_class, event, time_created) VALUES ('$object_id','$object_class','$event','$time')"); } } /** * System log listener. * This function listens to all events in the system and logs anything appropriate. * * @param String $event * @param String $object_type * @param mixed $object */ function system_log_listener($event, $object_type, $object) { system_log($object, $event); return true; } /** Register event to listen to all events **/ register_event_handler('all','all','system_log_listener'); ?>