Esempio n. 1
0
 /**
  * @return \Zend_Db_Adapter_Pdo_Mysql
  */
 protected function getDbAdapter()
 {
     return Registry::getDbAdapter();
 }
Esempio n. 2
0
 protected function addDbWriterToLogger(Zend_Log $logger, $config)
 {
     if (!(isset($config->active) && $config->active == 1)) {
         return;
     }
     $this->bootstrap('db');
     $dbLogWriter = new Zend_Log_Writer_Db(Registry::getDbAdapter(), $config->table_name, array('websiteid' => 'websiteid', 'id' => 'id', 'name' => 'name', 'additionalinfo' => 'additionalinfo', 'timestamp' => 'timestamp', 'userlogin' => 'userlogin', 'action' => 'message'));
     if (isset($config->level)) {
         $dbLogWriter->addFilter((int) $config->level);
     }
     $logger->addWriter($dbLogWriter);
 }