public function log($error)
    {
        if ($error instanceof \Error || $error instanceof \ErrorException) {
            return $this->logError($error);
        }
        
        if ($error instanceof \Exception) {
            return $this->logException($error);
        }
        
        $message = "Unable to log a " . (is_object($error) ? get_class($error) . ' ' : '') . gettype($error);
        $this->getLogger()->log(LogLevel::WARNING, $message);
    }