protected static function logError(Error $error) { $logger = static::getLogger(); if (!$logger) { return null; } return $logger->log($error); }