Pimcore\Logger::emergency PHP Method

emergency() public static method

$l is for backward compatibility
public static emergency ( $m, $context = [] )
    public static function emergency($m, $context = [])
    {
        self::log($m, "emergency", $context);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @param bool $forceReload
  * @return mixed|null|\Zend_Config
  * @throws \Zend_Exception
  */
 public static function getSystemConfig($forceReload = false)
 {
     $config = null;
     if (\Zend_Registry::isRegistered("pimcore_config_system") && !$forceReload) {
         $config = \Zend_Registry::get("pimcore_config_system");
     } else {
         try {
             $file = self::locateConfigFile("system.php");
             if (file_exists($file)) {
                 $config = new \Zend_Config(include $file);
             } else {
                 throw new \Exception($file . " doesn't exist");
             }
             self::setSystemConfig($config);
         } catch (\Exception $e) {
             $file = self::locateConfigFile("system.php");
             \Logger::emergency("Cannot find system configuration, should be located at: " . $file);
             if (is_file($file)) {
                 $m = "Your system.php located at " . $file . " is invalid, please check and correct it manually!";
                 Tool::exitWithError($m);
             }
         }
     }
     return $config;
 }
All Usage Examples Of Pimcore\Logger::emergency