protected function logError(Throwable $e)
    {
        if ($this->settings['displayErrorDetails']) {
            return;
        }

        if (!$this->logger) {
            return;
        }

        static $errorsLogged = [];

        // Get hash of Throwable object
        $errorObjectHash = spl_object_hash($e);

        // check: only log if we haven't logged this exact error before
        if (!isset($errorsLogged[$errorObjectHash])) {
            // Log
            $this->logger->error(get_class($e), ['exception' => $e]);

            // Save information that we have logged this error
            $errorsLogged[$errorObjectHash] = true;
        }
    }
protected function logError(Throwable $e)
    {
        if ($this->settings['displayErrorDetails']) {
            return;
        }

        if (!$this->logger) {
            return;
        }

        static $errorsLogged = [];

        // Get hash of Throwable object
        $errorObjectHash = spl_object_hash($e);

        // check: only log if we haven't logged this exact error before
        if (!isset($errorsLogged[$errorObjectHash])) {
            // Log
            $this->logger->error(get_class($e), ['exception' => $e]);

            // Save information that we have logged this error
            $errorsLogged[$errorObjectHash] = true;
        }
    }
protected function logError ( Throwable $ e ) { if ( $ this -> settings [ 'displayErrorDetails' ] ) { return ; } if ( ! $ this -> logger ) { return ; } static $ errorsLogged = [ ] ; // Get hash of Throwable object $ errorObjectHash = spl_object_hash ( $ e ) ; // check: only log if we haven't logged this exact error before if ( ! isset ( $ errorsLogged [ $ errorObjectHash ] ) ) { // Log $ this -> logger -> error ( get_class ( $ e ) , [ 'exception' => $ e ] ) ; // Save information that we have logged this error $ errorsLogged [ $ errorObjectHash ] = true ; } }
Write to the error log if displayErrorDetails is false.

@param Throwable $e
Write to the error log if displayErrorDetails is false .