Pimcore\Logger::crit PHP Method

crit() public static method

public static crit ( $m, $context = [] )
    public static function crit($m, $context = [])
    {
        self::log($m, "critical", $context);
    }

Usage Example

Example #1
0
 /**
  * @param null $adapter
  * @return null|Adapter\GD|Adapter\Imagick
  * @throws \Exception
  */
 public static function getInstance($adapter = null)
 {
     // use the default adapter if set manually (!= null) and no specify adapter is given
     if (!$adapter && self::$defaultAdapter) {
         $adapter = self::$defaultAdapter;
     }
     try {
         if ($adapter) {
             $adapterClass = "\\Pimcore\\Image\\Adapter\\" . $adapter;
             if (Tool::classExists($adapterClass)) {
                 return new $adapterClass();
             } else {
                 if (Tool::classExists($adapter)) {
                     return new $adapter();
                 } else {
                     throw new \Exception("Image-transform adapter `" . $adapter . "ยด does not exist.");
                 }
             }
         } else {
             if (extension_loaded("imagick")) {
                 return new Adapter\Imagick();
             } else {
                 return new Adapter\GD();
             }
         }
     } catch (\Exception $e) {
         \Logger::crit("Unable to load image extensions: " . $e->getMessage());
         throw $e;
     }
     return null;
 }
All Usage Examples Of Pimcore\Logger::crit