private function __construct() { $conf = Yun_Conf::getInstance(); $log_file_path = $conf->get(self::CONF_KEY); if (NULL === $log_file_path) { $log_file_path = "php://stderr"; } $this->handler[self::DEFAULT_HANDLER_ID] = new Yun_Log_File(self::DEFAULT_HANDLER_ID, $log_file_path); }
/** * 初始化main_conf * 如果没有设置,则读取默认设置 */ protected function initConf() { if (null === $this->main_conf) { $conf = Yun_Conf::getInstance()->get(self::CONF_KEY); if (!$conf instanceof Yun_Db_Conf_Interface) { $error_msg = 'Yun_Conf::get("yun_db_conf")\'s value must be implement Yun_Db_Conf_Interface.'; trigger_error($error_msg, E_USER_ERROR); } $this->main_conf = $conf; } }