/**
  * Factory to construct the logger and one or more writers
  * based on the configuration array
  *
  * @param array $config
  *
  * @internal param array|\Zend_Config $Array or instance of Zend_Config
  * @return Zend_Log
  */
 public static function factory($config = array())
 {
     if ($config instanceof Zend_Config) {
         $config = $config->toArray();
     }
     if (!is_array($config) || empty($config)) {
         /** @see Zend_Log_Exception */
         require_once 'Zend/Log/Exception.php';
         throw new Zend_Log_Exception('Configuration must be an array or instance of Zend_Config');
     }
     $log = new EngineBlock_Log();
     if (!is_array(current($config))) {
         $log->addWriter(current($config));
     } else {
         foreach ($config as $writer) {
             $log->addWriter($writer);
         }
     }
     return $log;
 }
 protected function _bootstrapLogging()
 {
     if (!isset($this->_configuration->logs)) {
         throw new EngineBlock_Exception("No logs defined! Logging is required, please set logs. in your application.ini");
     }
     $this->_log = EngineBlock_Log::factory($this->_configuration->logs);
 }