You are here

function salesforce_api_log in Salesforce Suite 7.2

Same name and namespace in other branches
  1. 6.2 salesforce_api/salesforce_api.module \salesforce_api_log()

Wraps watchdog(). Logs a message to the watchdog based on the Salesforce log settings.

Parameters

$level:

$message:

$vars:

$severity:

$link:

27 calls to salesforce_api_log()
salesforce_api_connect in salesforce_api/salesforce_api.module
Creates an object used for communicating with the Salesforce server and performs a login to verify the API credentials.
salesforce_api_delete_salesforce_objects in salesforce_api/salesforce_api.module
Wrapper for SFBaseClient::delete
salesforce_api_describeSObjects in salesforce_api/salesforce_api.module
Wrapper for SOAP SforceBaseClient::describeSObjects Given an array of sf object type, return an associative, normalized array of SF object definitions, indexed on machine-readable names of SObjects
salesforce_api_fieldmap_export_create in salesforce_api/salesforce_api.module
Creates an object for export to Salesforce based on the supplied Drupal object and fieldmap.
salesforce_api_get_deleted in salesforce_api/salesforce_api.module
Wrapper for SOAP SforceBaseClient::getDeleted. Searches for records deleted between start and end date.

... See full list

File

salesforce_api/salesforce_api.module, line 535
Defines an API that enables modules to interact with the Salesforce server.

Code

function salesforce_api_log($level, $message, $vars = array(), $severity = WATCHDOG_NOTICE, $link = NULL) {

  // Log nothing for notices if the related log level is not greater than or
  // equal to the level of this message.
  switch ($severity) {
    case WATCHDOG_NOTICE:
      if (variable_get('salesforce_api_activity_log', SALESFORCE_LOG_SOME) < $level) {
        return;
      }
      break;
    case WATCHDOG_WARNING:
    case WATCHDOG_ERROR:
      if (variable_get('salesforce_api_error_log', SALESFORCE_LOG_ALL) < $level) {
        return;
      }
      break;
    default:
      break;
  }

  // Log the message to the watchdog.
  watchdog('salesforce', $message, $vars, $severity, $link);
}