turn off System log


I use a cronjob to put some metadata of the users from another system into elgg. The cronjob runs every 10 minutes and it creates, updates and delete metadata. And everything is logged in the elgg systemLog. Now I have got 752,237 entries in the elgg_system_log table.

Can I turn off the system log for this action?

For setting the metadata I use $entity->metadata='value';

  • post that code here and we can then spend some time to study it to see what more code is needed to do what you're seeking.

  • OK, here is the code. It is a API function

     *  Ratings and Votings into elgg
     * ids is a string like that:
    *  VideoID:Rating:Count_of_Votes;VideoID2 ...
     * @param string $ids
     * @return string
    function apiSetRating($ids){
            $ignore = elgg_set_ignore_access(true);
            while (list($er)=each($ids)) {
                //get video
                    $error .='Video '.$idRat[0].' not found
                    Video: '.intval($idRat[0]).'
                    Rating: '.intval($idRat[1]).'
                    Voting: '.intval($idRat[2]);
                    //set Rating
                    //count votings
            return array('succsess'=>'Ratings and Votigs ok','error'=>$error,'Meldung'=>$meldung);
        return array('error'=>'no IDs');

  • i don't see any explicit ->save() !?;-)
    try :-
    elgg_unregister_event_handler('all', 'all', 'system_log_listener');
    elgg_unregister_event_handler('log', 'systemlog', 'system_log_default_logger');
    call..     apiSetRating($ids);
    elgg_register_event_handler('all', 'all', 'system_log_listener');
    elgg_register_event_handler('log', 'systemlog', 'system_log_default_logger');
    -- but need to set it back after your call. - function code is core - not avail to you! how ?