/** * Logs an exception with the Logger class, if it exists. * * @param string $message * @param \Exception $exception * @return bool */ protected function logException($message, $exception) { if (!isset($this->logger)) { return false; } $this->logger->critical($message, array('exception' => $exception)); return true; }