logLevel = $config->getLogLevel() ?: self::ALERT; } /** * {@inheritdoc} */ public function setLogLevel($level) { $this->logLevel = $level; } /** * {@inheritdoc} */ public function log($message, $level) { $engine = \Phacil\Framework\Registry::getInstance(); if ($this->logLevel >= $level) { switch ($level) { case self::EMERGENCY: case self::CRITICAL: case self::ERROR: trigger_error($message, E_ERROR); break; case self::ALERT: case self::WARNING: //$this->logger->alert($message); $engine->log->write($message,E_WARNING); break; case self::NOTICE: case self::INFO: $engine->log->write($message); break; default: $engine->log->write($message); } } } /** * {@inheritdoc} */ public function logException(\Exception $e) { throw new Exception($e->getMessage()); } }