You are here

protected function LockrKeyProvider::logException in Lockr 8.3

Same name and namespace in other branches
  1. 8.4 src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::logException()
  2. 4.x src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::logException()

Logs exceptions that occur during Lockr requests.

Parameters

\Exception $e: The exception to log.

2 calls to LockrKeyProvider::logException()
LockrKeyProvider::generateKey in src/Plugin/KeyProvider/LockrKeyProvider.php
Creates a new key value, returning it.
LockrKeyProvider::getKeyValue in src/Plugin/KeyProvider/LockrKeyProvider.php
Returns the value of a key.

File

src/Plugin/KeyProvider/LockrKeyProvider.php, line 203
Contains Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider.

Class

LockrKeyProvider
Adds a key provider that allows a key to be stored in Lockr.

Namespace

Drupal\lockr\Plugin\KeyProvider

Code

protected function logException(\Exception $e) {
  $this->logger
    ->error('Error retrieving value from Lockr [{ex_code}]: {ex_msg}', [
    'ex_code' => $e
      ->getCode(),
    'ex_msg' => $e
      ->getMessage(),
  ]);
}