当前位置: 首页>>代码示例>>C++>>正文


C++ LogCategory::fatal方法代码示例

本文整理汇总了C++中LogCategory::fatal方法的典型用法代码示例。如果您正苦于以下问题:C++ LogCategory::fatal方法的具体用法?C++ LogCategory::fatal怎么用?C++ LogCategory::fatal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LogCategory的用法示例。


在下文中一共展示了LogCategory::fatal方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: check_class

		void check_class(uint16_t id, string name, unsigned long hash)
		{
			DCClass* dcc = g_dcf->get_class(id);
			if(name != dcc->get_name())
			{
				// TODO: Try and update the database instead of exiting
				m_log->fatal() << "Class name '" << dcc->get_name() << "' from DCFile does not match"
				               " name '" << name << "' in database, for dc_id " << id << endl;
				m_log->fatal() << "Database must be rebuilt." << endl;
				exit(1);
			}

			HashGenerator gen;
			dcc->generate_hash(gen);
			if(hash != gen.get_hash())
			{
				// TODO: Try and update the database instead of exiting
				m_log->fatal() << "Class hash '" << gen.get_hash() << "' from DCFile does not match"
				               " hash '" << hash << "' in database, for dc_id " << id << endl;
				m_log->fatal() << "Database must be rebuilt." << endl;
				exit(1);
			}

			// TODO: Check class_fields table exists

		}
开发者ID:shadowcoder,项目名称:Astron,代码行数:26,代码来源:SociSQLEngine.cpp

示例2: check_class

    void check_class(uint16_t id, string name)
    {
        const Class* dcc = g_dcf->get_class_by_id(id);
        if(name != dcc->get_name()) {
            // TODO: Try and update the database instead of exiting
            m_log->fatal() << "Class name '" << dcc->get_name() << "' from File does not match"
                           " name '" << name << "' in database, for dc_id " << id << endl;
            m_log->fatal() << "Database must be rebuilt." << endl;
            astron_shutdown(1);
        }

        // TODO: Check class_fields table exists

    }
开发者ID:staticfox,项目名称:Astron,代码行数:14,代码来源:SociSQLDatabase.cpp

示例3: Role

		DatabaseServer(RoleConfig roleconfig) : Role(roleconfig),
			m_db_engine(DBEngineFactory::singleton.instantiate(
							engine_type.get_rval(roleconfig),
							roleconfig["engine"],
							min_id.get_rval(roleconfig),
							max_id.get_rval(roleconfig))),
			m_control_channel(control_channel.get_rval(roleconfig)),
			m_min_id(min_id.get_rval(roleconfig)),
			m_max_id(max_id.get_rval(roleconfig))
		{
			// Initialize DatabaseServer log
			std::stringstream log_title;
			log_title << "Database(" << m_control_channel << ")";
			m_log = new LogCategory("db", log_title.str());

			// Check to see the engine was instantiated
			if(!m_db_engine)
			{
				m_log->fatal() << "No database engine of type '" << engine_type.get_rval(roleconfig) << "' exists." << std::endl;
				exit(1);
			}

			// Listen on control channel
			subscribe_channel(m_control_channel);
		}
开发者ID:Idylia,项目名称:OpenOTP,代码行数:25,代码来源:DatabaseServer.cpp

示例4: exit

    DBClientBase *new_connection()
    {
        string error;
        DBClientBase *connection;

        if(!(connection = m_connection_string.connect(error))) {
            m_log->fatal() << "Connection failure: " << error << endl;
            exit(1);
        }

        return connection;
    }
开发者ID:Fantasticer,项目名称:Astron,代码行数:12,代码来源:MongoDatabase.cpp

示例5: add_variable

void ConfigGroup::add_variable(const string& varname, rtest r)
{
	bool inserted = m_variables.insert(pair<string,rtest>(varname, r)).second;
	if(!inserted)
	{
		config_log.fatal() << "Duplicate ConfigVariable name (" << varname << ") in ConfigGroup '"
		                   << m_name << ".'\n\tPlease submit a bug/issue to Astron with your"
		                   << " CMakeCache and this ouput.\n";
		exit(1);
		// TODO: Produce a warning for the developer or something...
	}
}
开发者ID:Unkn0wn-0nes,项目名称:Astron,代码行数:12,代码来源:ConfigGroup.cpp


注:本文中的LogCategory::fatal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。