The log API contains all API methods for inserting activity log data.


Methods: log__


log_create_entry($data) - Used to create an entry in the OR activity log

create(array $data) : array


Returns: (array)

['error'] = TRUE/FALSE

['status_msg'] = Result, Either success message or error


Parameters:

$data (array)

Expects an array containing the following array keys:

$data['log_api_command'] - TEXT - API/Command you are running when the error occurred or the message is generate from.

$data['log_message'] -  TEXT -  Message to insert in the log


<?php

       require('/api/api.inc.php');

   $api = new api();


       $api->load_local_api('log__log_create_entry',array(

               'log_api_command'=>'my function name',

               'log_message'=>'This specific thing happened'

       ));

       echo '<pre>';

       print_r($result);

       echo '</pre>';

?>