function logError($errorMessage, \Exception $exception)
    {
        if ($this->logger instanceof LoggerInterface) {
            $this->logger->error($errorMessage . "\n" . $exception->getTraceAsString());
        }
    }
function logError($errorMessage, \Exception $exception)
    {
        if ($this->logger instanceof LoggerInterface) {
            $this->logger->error($errorMessage . "\n" . $exception->getTraceAsString());
        }
    }
function logError ( $ errorMessage , \ Exception $ exception ) { if ( $ this -> logger instanceof LoggerInterface ) { $ this -> logger -> error ( $ errorMessage . "\n" . $ exception -> getTraceAsString ( ) ) ; } }
Logs an error, if the error logger is available

@param string     $errorMessage
@param \Exception $exception
Logs an error if the error logger is available