/** * Create a log entry * * @param string $msg * @param int $level * * Possible value for $level * * Zend_Log::EMERG = 0; // Emergency: system is unusable * Zend_Log::ALERT = 1; // Alert: action must be taken immediately * Zend_Log::CRIT = 2; // Critical: critical conditions * Zend_Log::ERR = 3; // Error: error conditions * Zend_Log::WARN = 4; // Warning: warning conditions * Zend_Log::NOTICE = 5; // Notice: normal but significant condition * Zend_Log::INFO = 6; // Informational: informational messages * Zend_Log::DEBUG = 7; // Debug: debug messages * * @return Zend_Log::log results */ public static function log($msg, $level = Zend_Log::INFO) { $logger = MyProject::registry('logger'); if ($logger->hasWriter()) { return $logger->log($msg, $level); } }
/** * Display error to end user and report it by mail if enable * * @return void */ public function applicationerrorAction() { // get current config $config = MyProject::registry('config'); // if report is enable sent exception info by mail if ($config->debug->report->enable) { BaseZF_Error_Handler::sendExceptionByMail($this->_error_handler->exception, $config->debug->report->from, $config->debug->report->to); } }
/** * Retrieve the Logger instance */ protected function _getLoggerInstance() { return MyProject::registry('logger'); }