You are here

static function DrupalSalesforce::watchdog in Salesforce Suite 7

Same name and namespace in other branches
  1. 5.2 salesforce_api/salesforce.class.inc \DrupalSalesforce::watchdog()

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

Parameters

$level:

$message:

$vars:

$severity:

$link:

7 calls to DrupalSalesforce::watchdog()
DrupalSalesforce::login in salesforce_api/salesforce.class.inc
Establishes a connection and logs in to the Salesforce server.
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_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_reset_expired_password in salesforce_api/salesforce_api.module
Helper function for salesforce_api_connect() to reset an expired password, for the website's default salesforce user only.
sf_entity_export in sf_entity/sf_entity.module
Exports an entity to Salesforce using the specified fieldmap and stores the ID of the Salesforce object for the entity.

... See full list

File

salesforce_api/salesforce.class.inc, line 92
Defines the class used for communicating with the Salesforce server.

Class

DrupalSalesforce

Code

static function watchdog($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);
}