You are here

protected function FedEx::logRequest in Commerce FedEx 8

Logs Requests and responses from FedEx.

Parameters

string $message: The message to log.

mixed $data: The FedEx Request or response object.

string $level: The Log level.

bool $skip_config_check: Whether to skip the check to log or not.

1 call to FedEx::logRequest()
FedEx::calculateRates in src/Plugin/Commerce/ShippingMethod/FedEx.php
Calculates rates for the given shipment.

File

src/Plugin/Commerce/ShippingMethod/FedEx.php, line 432

Class

FedEx
Provides the FedEx shipping method.

Namespace

Drupal\commerce_fedex\Plugin\Commerce\ShippingMethod

Code

protected function logRequest($message, $data, $level = LogLevel::INFO, $skip_config_check = FALSE) {

  /* If we are using the old configuration */
  if (is_array($this->configuration['options']['log'])) {
  }
  if ($skip_config_check || @$this->configuration['options']['log']['request']) {
    $this->watchdog
      ->log($level, "{$message} <br><pre>@rate_request</pre>", [
      '@rate_request' => var_export($data, TRUE),
    ]);
  }
}