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


C++ TRACE_LOG函数代码示例

本文整理汇总了C++中TRACE_LOG函数的典型用法代码示例。如果您正苦于以下问题:C++ TRACE_LOG函数的具体用法?C++ TRACE_LOG怎么用?C++ TRACE_LOG使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: memset

Contract::Contract(string spName)
{
	memset(debug,0,16);
	sprintf_s(debug,16,"ContractObject");
    this->spName = spName;
	InitializeCriticalSection(&cs);
	this->commodity = Commodity::findFor(spName);
	//TRACE_LOG("commodity findfor ok");
	orderCount = 0;
	if(this->isDomestic()) {
		TRACE_LOG("enter isDomestic part");
		fixName = "";
	    ronhonName = "";
		patsapiName = "";
	} else {
		//TRACE_LOG("begin getRonhonNameFor");
	    fixName = KnownContract::getFixNameFor(spName);
	    ronhonName = KnownContract::getRonhonNameFor(spName);
		patsapiName =  KnownContract::getPatsApiNameFor(spName);
		TRACE_LOG("spName = %s", spName.c_str());
		TRACE_LOG("patsapiName = %s", patsapiName.c_str());
	}
}
开发者ID:marco-sun,项目名称:arbi6,代码行数:23,代码来源:Contract.cpp

示例2: TRACE_LOG

void Contract::loadOrderCount()
{
	TRACE_LOG("loadOrderCount.");
	ifstream file(getDateFileName());
    if(file.fail()) {
		TRACE_LOG("Read %s fail",getDateFileName().c_str());
		openFile();
		return;
	}

	string contractName;
	while(!file.eof()) 
	{
		file >> contractName;
		if (contractName.length() > 1)
		{
			Contract * c = Contract::get(contractName);
			c->increaseOrderCount(1);
		}
	}
	file.close();
	openFile();
}
开发者ID:marco-sun,项目名称:arbi6,代码行数:23,代码来源:Contract.cpp

示例3: get_ranged_svr_list_callback

int get_ranged_svr_list_callback(usr_info_t* p, uint8_t* body, uint32_t bodylen, int ret)
{
	//varify the respond data
    TRACE_LOG("get ranged callback");
	CHECK_VAL_GE(bodylen, sizeof(svr_list_t));

	svr_list_t* svrlist = reinterpret_cast<svr_list_t*>(body);

    //DEBUG_LOG("svrlist [%d %d]", svrlist->domain_id, svrlist->online_cnt);
	//chk if the pkg len is valid
	CHECK_VAL(bodylen, sizeof(svr_list_t) + svrlist->online_cnt * sizeof(svr_info_t)); 

    return send_ranged_svrlist(p, svrlist->svrs, svrlist->online_cnt);
}
开发者ID:Zhanyin,项目名称:taomee,代码行数:14,代码来源:mysvrlist.cpp

示例4: ERROR_LOG

el::lib_tcp_peer_info_t* el_async::connect( const std::string& ip, uint16_t port )
{
	int fd = el::lib_tcp_t::connect(ip, port, 1, false, 
		g_bench_conf->get_page_size_max(),
		g_bench_conf->get_page_size_max());
	if (-1 == fd){
		ERROR_LOG("[ip:%s, port:%u]", ip.c_str(), port);
	}else{
		TRACE_LOG("[ip:%s, port:%u, fd:%u]", ip.c_str(), port, fd);
		return g_net_server->get_server_epoll()->add_connect(fd, el::FD_TYPE_SVR, ip.c_str(), port);
	}

	return NULL;
}
开发者ID:75912001,项目名称:async,代码行数:14,代码来源:service_if.cpp

示例5: get_ranged_svr_list

/**
  * @brierf Send a request package to switch server, then get the respond, but do not parse it.
  * @param  uid. user id.
  * @param    friendcount. haw many friends.
  * @param    allfriendid. store the ids in an array
  * @return     int. 0 on success. less than 0 on error.
  */
int get_ranged_svr_list(usr_info_t* p, int start_id, int end_id)
{
    TRACE_LOG("enter get_ranged_svr_list");
    // pack up the request data
	int friendcount = 0;
    int idx = sizeof(svr_proto_t);
    taomee::pack_h(login_switch_sendbuf, static_cast<uint16_t>(0), idx);
    taomee::pack_h(login_switch_sendbuf, start_id, idx);
    taomee::pack_h(login_switch_sendbuf, end_id, idx);
    taomee::pack_h(login_switch_sendbuf, friendcount, idx);
    //taomee::pack(login_switch_sendbuf, allfriendid, friendcount * sizeof(userid_t), idx);
    init_switch_head(p, login_switch_sendbuf, idx, SWITCH_GET_RANGED_SVR_LIST);
    return send_to_switch(p, login_switch_sendbuf, idx);
}
开发者ID:Zhanyin,项目名称:taomee,代码行数:21,代码来源:mysvrlist.cpp

示例6: opcode_loadb

void opcode_loadb(void)
{
  uint8_t *address = z_mem + (uint16_t)(op[0] + (int16_t)op[1]);

  TRACE_LOG("Opcode: LOADB.\n");

  read_z_result_variable();

  if (address > active_z_story->static_memory_end)
  {
    TRACE_LOG("Static memory end: %x.\n", active_z_story->static_memory_end);
    TRACE_LOG("Trying to loadb from %x which is above static memory.\n",
        address);
    set_variable(z_res_var, 0, false);
  }
  else
  {
    TRACE_LOG("Loading from %x to var %x.\n",
        *address,
        z_res_var);
    set_variable(z_res_var, *address, false);
  }
}
开发者ID:dfjdejulio,项目名称:fizmo,代码行数:23,代码来源:variable.c

示例7: connector_callback

void* connector_callback(uint64_t conn, bool is_ok) {
    ERROR_LOG("收到连接器回调: %lld, 逻辑服务器为: %lld", conn, s_game_conn);
    if (conn == s_game_conn) {
        if (is_ok) {
            TRACE_LOG("连接器连接成功: %lld, 发起注册", conn);
            set_init_ok(true);
            regist_to_game();            
        } else {
            connect_gs();
        }
    }

    return NULL;
}
开发者ID:lj-211,项目名称:go_fight,代码行数:14,代码来源:gate_logic.cpp

示例8: memset

// not used now.
void SpPriceSource::SPAccountLogout()
{
	char szAccountLogout[256];
	memset(szAccountLogout, 0, sizeof(szAccountLogout));
	
	//get AccountLogout msg
	strcat_s(szAccountLogout, 256, "3122,0,");
	strcat_s(szAccountLogout, 256, SPInvestorId);
	strcat_s(szAccountLogout, 256, "\r\n");
	//e.g. 3122,0,1000 <MessageId>,<MessageType>,<AccNo><cr><lf>

	if(1 != m_cTcpClinet.TCPSend(szAccountLogout))
		TRACE_LOG("SpPriceSource: send msg failed");
}
开发者ID:marco-sun,项目名称:arbi6,代码行数:15,代码来源:SpPriceSource.cpp

示例9: disconnect

int32_t fs_opr_t::connect(uint32_t address, int32_t port, const char* pswd, bool reconnect) {
    int32_t ret = IMS_FAIL_CONNECT;
    char ip[sizeof "255.255.255.255"];

    if (reconnect) {
        disconnect();
        ims_tool_t::inet_ntop(address, ip, sizeof "255.255.255.255");

        if (esl_connect(&_handle, ip, _port, NULL, _pswd) == ESL_SUCCESS) {
            TRACE_LOG("reconnect to FreeSWITCH [%s:%d] success", ip, _port);
            eval(RECORD_BASEDIR, _recordbase, LEN_256);
            ret = IMS_SUCCESS;
        } else {
            WARNING_LOG("reconnect to FreeSWITCH [%s:%d] failed(%s)", ip, _port, _handle.err);
        }
    } else {
        if (is_handle_valid()) {
            return IMS_SUCCESS;
        }

        strncpy(_pswd, pswd, LEN_16);
        _address = address;
        _port = port;

        ims_tool_t::inet_ntop(address, ip, sizeof "255.255.255.255");

        if (esl_connect(&_handle, ip, _port, NULL, _pswd) == ESL_SUCCESS) {
            TRACE_LOG("connect to FreeSWITCH [%s:%d] success", ip, _port);
            eval(RECORD_BASEDIR, _recordbase, LEN_256);
            ret = IMS_SUCCESS;
        } else {
            WARNING_LOG("connect to FreeSWITCH [%s:%d] failed(%s)", ip, _port, _handle.err);
        }
    }

    return ret;
}
开发者ID:AaronZhangL,项目名称:CC,代码行数:37,代码来源:fs_opr.cpp

示例10: TRACE_LOG

void RohonDealer::placeOrder(Order *order)
{
    int ref;
    //放入map中,执行相应动作,开启等待线程
    TRACE_LOG("RohonDealer::placeOrder, orderid:%s.",order->getId().c_str());
    if(!started)
    {
        TRACE_LOG("RohonDealer::placeOrder failed. RohonDealer not started.");
        order->setRejected();
        return;
    }
    //放入map中
    EnterCriticalSection(&cs);
    RohonDealerInventory* pInventory = addInventory(order);
    if(pInventory == NULL)
    {   //orderID与正在处理中的重复,要拒绝这次下单请求
        LeaveCriticalSection(&cs);
        TRACE_LOG("RohonDealer::placeOrder failed. orderID is duplicated.");
        //order->setRejected();
        return;
    }
    //分配localRef
    ref = pUserSpi->getCurOrderRef();
    pInventory->localRef = ref;
    LeaveCriticalSection(&cs);
    //执行下单动作
    if(0 != pUserSpi->InsertOrder(ref,order))
    {   //下单直接失败
        EnterCriticalSection(&cs);
        delInventory(pInventory);
        LeaveCriticalSection(&cs);
        TRACE_LOG("RohonDealer::placeOrder failed. 下单直接失败");
        order->setRejected();
        return;
    }
    return;
}
开发者ID:marco-sun,项目名称:arbi6,代码行数:37,代码来源:RohonDealer.cpp

示例11: TRACE_LOG

int Gobang::handle_player_action(sprite_t* p, const uint8_t body[], int len)
{
	TRACE_LOG("Gobang Handle Player Action: uid=%u, grpid=%lu",
				p->id, m_gamegrp->id);

struct actpkg {
	uint32_t uid;
	Chess_Pos_Type row, col;
} __attribute__((__packed__));

	if ( started_check(p, len, sizeof(actpkg)) == -1 ) return -1;

	int i = 0;
	actpkg apkg;
	UNPKG_UINT(body, apkg.uid, i);
	UNPKG_UINT(body, apkg.row, i);
	UNPKG_UINT(body, apkg.col, i);
	if ( (p->id != apkg.uid) || (m_nxmover != apkg.uid) ) {
		ERROR_RETURN( ("UserID Mismatch, uid=%u, %u, %u",
						p->id, apkg.uid, m_nxmover), -1 );
	}

	REMOVE_TIMER(p, timerid);
	if ( place_chess(apkg.row, apkg.col) == -1 ) return -1;

	broadcast_action(body, p->id);
	++m_nsteps; // increase number of chesses placed

	std::vector<ChessCoord> adjchesses;
	if ( determine_winner(apkg.row, apkg.col, adjchesses) ) {
		notify_winner(p->id, adjchesses);
		m_nxmover = 0;
		send_game_score(p, 0, 1);

		DEBUG_LOG("Gobang Winner Determined\t[winner=%u]", p->id);
		return GER_end_of_game;
	} else if (draw()) {
		notify_winner(0);
		m_nxmover = 0;
		send_game_score(p, 2, 2);
		return GER_draw_game;
	}

	set_nxmover();
	sprite_t* op = get_sprite_from_gamegrp(m_nxmover, m_gamegrp);
	time_t exptm = time(0) + 62;
	timerid = ADD_TIMER_EVENT(op, on_timer_expire, 0, exptm);
	return 0;
}
开发者ID:Zhanyin,项目名称:taomee,代码行数:49,代码来源:gobang.cpp

示例12: NokiaLinearVolumeItfCallback

void NokiaLinearVolumeItfCallback(XANokiaLinearVolumeItf /*caller*/,
                                  void* pContext,
                                  XAuint32 event,
                                  XAboolean /*eventBooleanData*/)
{
    switch (event) {
    case XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED:
        if (pContext)
            ((XARadioSessionImpl*)pContext)->VolumeChanged();
        break;
    default:
        TRACE_LOG((_L("NokiaLinearVolumeItfCallback: default")));
        break;
    }
}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:15,代码来源:xaradiosessionimpl.cpp

示例13: EngineObjectCallback

void EngineObjectCallback(XAObjectItf /*caller*/,
                          const void */*pContext*/,
#ifdef PLUGIN_SYMBIAN_TRACE_ENABLED
                          XAuint32 event,
#else
                          XAuint32 /*event*/,
#endif /*PLUGIN_SYMBIAN_TRACE_ENABLED*/
                          XAresult /*result*/,
                          XAuint32 /*param*/,
                          void */*pInterface*/)
{
#ifdef PLUGIN_SYMBIAN_TRACE_ENABLED
    TRACE_LOG((_L("Engine object event: 0x%x\n"), (int)event));
#endif /*PLUGIN_SYMBIAN_TRACE_ENABLED*/
}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:15,代码来源:xaradiosessionimpl.cpp

示例14: filter_init

/*---------------------------------------------------------------------*/
int32_t
filter_init(Brick *brick, Linker_Intf *li)
{
	TRACE_BRICK_FUNC_START();
	brick->private_data = calloc(1, sizeof(FilterContext));
	if (brick->private_data == NULL) {
		TRACE_LOG("Can't create private context "
			  "for filter\n");
		TRACE_BRICK_FUNC_END();
		return -1;
	}
	li->type = SHARE;
	TRACE_BRICK_FUNC_END();
	return 1;
}
开发者ID:ajamshed,项目名称:packet-bricks,代码行数:16,代码来源:filter.c

示例15: dup_init

/*---------------------------------------------------------------------*/
int32_t
dup_init(Brick *brick, Linker_Intf *li)
{
	TRACE_BRICK_FUNC_START();
	brick->private_data = calloc(1, sizeof(linkdata));
	if (brick->private_data == NULL) {
		TRACE_LOG("Can't create private context "
			  "for duplicator\n");
		TRACE_BRICK_FUNC_END();
		return -1;
	}
	li->type = COPY;
	TRACE_BRICK_FUNC_END();
	return 1;
}
开发者ID:asifjamshed,项目名称:packet-bricks,代码行数:16,代码来源:dup.c


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