You are here

protected function LockrKeyProvider::logException in Lockr 4.x

Same name and namespace in other branches
  1. 8.4 src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::logException()
  2. 8.3 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

File

src/Plugin/KeyProvider/LockrKeyProvider.php, line 210
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(),
  ]);
}