• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LOGT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: LOGT

//-----------------------------------------------------------------------------
int  ContextSP::_r_send_header()
{
    if(_hdr.bytes()) {
        int err;
        if(_hdr.is_ssl == true) {//used when http proxy is configured in browser
            _sck_ssl_connect = true;
            LOGT("H CONNECT accepted");
            err = _sock.sendall((const u_int8_t*)HTTP_200,  strlen(HTTP_200), SS_TOUT);
        }
        else if(_hdr._nprx != 0){

            _hdr.prep_doc();
            err = _rock.sendall(_hdr.buf(), _hdr.bytes(), SS_TOUT);
            LOGT("H header sent: ["<<_hdr.bytes()
                  <<"][" << _hdr.buf() << "]\n");
        }
        _hdr.clear();
        if(0!=err) {
            _s_send_reply(GENFAILURE);
            _rock.destroy();
            throw Mex((REMOTE_CLOSED_ONSEND),__FILE__,__LINE__);
        }
    }
    if(_working)
        return 1;
    return Context::_r_send_header();
}
开发者ID:comarius,项目名称:buflea,代码行数:28,代码来源:contextsp.cpp


示例2: testThread

void testThread()
{
	char arg1[] = "th1";
	char arg2[] = "th2";

	Thread th1((Thread::Routine)foo, arg1);
	Thread th2((Thread::Routine)foo, arg2);

	th1.setBackground(true);
	th1.start();
	th2.start();

#ifdef _WIN32
	Thread::sleep(500);
	th1.suspend();
	LOGT("th1 was suspended.");

	Thread::sleep(500);
	th2.suspend();
	LOGT("th2 was suspended.");

	Thread::sleep(500);
	th1.resume();
	LOGT("th1 was resumed.");

	Thread::sleep(500);
	th2.resume();
	LOGT("th2 was resumed.");
#endif

	int ret2 = th2.join();

	LOG_VAR(ret2);
}
开发者ID:CltKitakami,项目名称:MyLib,代码行数:34,代码来源:TestThread.cpp


示例3: LOGT

		void IoServiceCore::start()
		{
			_netThread->run();
			LOGT("Create net thread [ %s ]", _netThread->getThreadId());

			_logicThread->run();
			LOGT("Create main logic thread [ %s ]", _logicThread->getThreadId());
		}
开发者ID:jimmy0313,项目名称:JMEngine,代码行数:8,代码来源:JME_Core.cpp


示例4: run

	void run()
	{
		LOGT("hello");
		while (this->getExit() == false)
		{
			LOGT("hello");
			Thread::sleep(1000);
		}
	}
开发者ID:CltKitakami,项目名称:MyLib,代码行数:9,代码来源:TestTimer.cpp


示例5: while

void Server::start() {
    while (!abortableWaitForConnection(socket, pipe[0])) {
        pool.execute(socket.accept());
    }

    LOGT("Closed server main loop.");
    LOGT("Closing worker pool...");
    pool.stop();
}
开发者ID:pkubik,项目名称:tin,代码行数:9,代码来源:HttpServer.cpp


示例6: LOGI

void server::handle_accept(const boost::system::error_code& e) {
	if (!e) {
		// handle connection
		LOGI("new connection, id="<<new_connection_->connection_id());
		LOGT("Handle new connection ...");
		LOGT("connection reference count: "<<new_connection_.use_count());
		new_connection_->start();
		LOGT("connection reference count after start: "<<new_connection_.use_count());
	}

	// accept again
	start_accept();
}
开发者ID:Xiaobin0860,项目名称:Demos,代码行数:13,代码来源:server.cpp


示例7: assert

int  ContextSP::_parse_header()
{
    if(_pending_hdr()==0)
        return 0;

    assert(!_sck_ssl_connect);
    //const bool con = _rock.check_connection();
    if(_hdr._nhost)
    {
        char        host[512]= {0};
        char        port[4] = "80";

        ::strcpy(host, _hdr.get_host().c_str());
        LOGT("H C: hdr ["<<_hdr.bytes()
              << "][" << _hdr.buf() << "]\n to: " << host);

        char* pp = strchr(host,':');
        if(pp) {
            *pp++=0;
        } else {
            pp = port;
        }

        _raddr.port = ::atoi(pp);
        _raddr.ip   = sock::dnsgetip(host);
        if(_raddr.ip.ipv4==0){
            throw Mex(CANNOT_CONNECT,__FILE__,__LINE__);
        }
        if(_working )
        {
            if(_rip == _raddr){
                LOGT("H sending hdr to:"<< IP2STR(_rip.ip) << ":" << _rip.port);
                return _r_send_header();
            } // else rip!=ap
            return _overwrite_connection(_raddr);
        }
        assert(!_rock.isopen());

        if(_check_acl())
        {
            return 0;
        }
        _rock.raw_sethost(_raddr.ip, htons(_raddr.port));
        _rip     = _raddr;
        return _rock_connect();
    }
    if(_working)
        return _r_send_header();

    throw Mex(CANNOT_PARSE_HTTP,__FILE__,__LINE__);
}
开发者ID:comarius,项目名称:buflea,代码行数:51,代码来源:contextsp.cpp


示例8: LOGT

void server::start_accept() {
	//>= 2^ 62
	++connection_id_;
	if ((connection_id_ >= 4611686018427387904) || (connection_id_ <= 0)) {
		connection_id_ = 1;
	}
	LOGT("start_accept, connection_id="<<connection_id_);
	//前一个connection不会释放吗?为什么? connection.start... 通过shared_from_this引用?
	LOGT("connection reference count: "<<new_connection_.use_count());
	new_connection_.reset(new connection(io_service_pool_.get_io_service(), connection_id_));
	LOGT("connection reference count: "<<new_connection_.use_count());
	acceptor_.async_accept(new_connection_->socket(),
			boost::bind(&server::handle_accept, this, boost::asio::placeholders::error));
}
开发者ID:Xiaobin0860,项目名称:Demos,代码行数:14,代码来源:server.cpp


示例9: handle

	virtual void handle(int v)
	{
		if (v > 100)
			LOGT("T1 work");
		else
			handleNext(v);
	}
开发者ID:CltKitakami,项目名称:MyLib,代码行数:7,代码来源:TestMessageHandler.cpp


示例10: OSPD_SubscribeResult

/****************************************************************************************************
 * @fn      OSPD_SubscribeResult
 *          Enables subscription for results
 *
 ***************************************************************************************************/
osp_status_t OSPD_SubscribeResult(uint32_t sensorType, OSPD_ResultDataCallback_t dataReadyCallback ) {
    osp_status_t result = OSP_STATUS_OK;

    LOGT("%s\r\n", __FUNCTION__);

    return result;
}
开发者ID:crankycoder,项目名称:open-sensor-platform,代码行数:12,代码来源:osp_remoteprocedurecalls_stub.cpp


示例11: OSPD_GetVersion

/****************************************************************************************************
 * @fn      OSPD_GetVersion
 *          Helper routine for getting daemon version information
 *
 ***************************************************************************************************/
osp_status_t OSPD_GetVersion(char* versionString, int bufSize) {
    osp_status_t result = OSP_STATUS_OK;

    LOGT("%s\r\n", __FUNCTION__);

    return result;
}
开发者ID:crankycoder,项目名称:open-sensor-platform,代码行数:12,代码来源:osp_remoteprocedurecalls_stub.cpp


示例12: OSPD_Deinitialize

/****************************************************************************************************
 * @fn      OSPD_Deinitialize
 *          Tear down RPC interface function
 *
 ***************************************************************************************************/
osp_status_t OSPD_Deinitialize(void) {
    osp_status_t result = OSP_STATUS_OK;

    LOGT("%s\r\n", __FUNCTION__);

    return result;
}
开发者ID:crankycoder,项目名称:open-sensor-platform,代码行数:12,代码来源:osp_remoteprocedurecalls_stub.cpp


示例13: OSPD_UnsubscribeResult

/****************************************************************************************************
 * @fn      OSPD_UnsubscribeResult
 *          Unsubscribe from sensor results
 *
 ***************************************************************************************************/
osp_status_t OSPD_UnsubscribeResult(uint32_t sensorType) {
    osp_status_t result = OSP_STATUS_OK;

    LOGT("%s\r\n", __FUNCTION__);

    return result;
}
开发者ID:crankycoder,项目名称:open-sensor-platform,代码行数:12,代码来源:osp_remoteprocedurecalls_stub.cpp


示例14: testTimerHandler

void testTimerHandler()
{
	LOGT("<testTimerHandler>");

	Timer t1, t2;
	TimerHandler handler;
	handler.attach(t1, timeout1);
	handler.attach(t2, timeout2);

	t1.setInterval(1);
	t2.setInterval(2);

	sw1.start();
	sw2.start();

	t1.start();
	t2.start();

	Thread::sleep(15);
	handler.detach(t2);
	Thread::sleep(30);

	t1.stop();
	t2.stop();

	Thread::sleep(105);
}
开发者ID:CltKitakami,项目名称:MyLib,代码行数:27,代码来源:TestTimer.cpp


示例15: LOGT

void NetManager::event_onSessionDisconnect(TcpSessionPtr session)
{
	LOGT("NetManager::event_onSessionDisconnect. SessionID=" << session->getSessionID() << ", remoteIP=" << session->getRemoteIP() << ", remotePort=" << session->getRemotePort());

	if (isConnectID(session->getSessionID()))
	{
	}
	else
	{
		if (session->getUserParam() == SS_LOGINED)
		{
			auto info = UserManager::getRef().getInnerUserInfoBySID(session->getSessionID());
			if (info)
			{
				UserManager::getRef().userLogout(info);
				info->sID = InvalidSeesionID;
			}
		}

	}

	if (UserManager::getRef().getAllOnlineUserCount() == 0 && _onSafeClosed)
	{
		SessionManager::getRef().post(_onSafeClosed);
		_onSafeClosed = nullptr;
	}
}
开发者ID:heber,项目名称:breeze,代码行数:27,代码来源:netManager.cpp


示例16: LOGT

CALLR  CtxDns::_get_hostname()
{
    DnsCommon dns;

    if(__dnsssl->deque_host(_cliip, _hdr.asll(), dns))
    {
        LOGT(" found  host from dns[" << IP2STR(_cliip) << "]<="<< dns.hostname);
        if(dns.domainip==0)
        {
             _raddr = __db->dnsgetip(dns.hostname);
        }
        else
        {
            _raddr = SADDR_46(dns.domainip);
        }
        _raddr.set_port(_pconf->conport ? _pconf->conport : 80);
        _set_rhost(_raddr);
        LOGD(_cliip.c_str() << " --r/dns--> "<< _raddr.c_str() );
        return _host_connect(_r_socket);
    }
    else if(!_pconf->redirect.empty())
    {    //fallback
        _set_rhost(_pconf->toaddr, 0, 0);
        LOGD(_cliip.c_str() << " --r/cfg--> "<< _raddr.c_str() );
        return _host_connect(_r_socket);
    }
    LOGE("No destination host found in queued hosts, neither in configuration. Connection closed");
    return R_KILL;
}
开发者ID:comarius,项目名称:buflea,代码行数:29,代码来源:contextdns.cpp


示例17: LOGS

// -----------------------------------------------------------------------------
// CUpnpHttpServer::ConnectionAcceptedL
//
// -----------------------------------------------------------------------------
//
CUpnpTcpSession* CUpnpHttpServer::ConnectionAcceptedL( RSocket aSocket )
    {
    LOG_FUNC_NAME;

    #ifdef _DEBUG
    TInetAddr tempAddr;
    aSocket.RemoteName( tempAddr );
    tempAddr.ConvertToV4();

    const TInt KMaxAdressLength = 20;
    TBuf<KMaxAdressLength> addrBuf;
    tempAddr.Output( addrBuf );

    HBufC8* addrBuf8 = UpnpString::FromUnicodeL( addrBuf );
    CleanupStack::PushL( addrBuf8 );

    LOGS( "CUpnpHttpServer::ConnectionAcceptedL - Remote socket connected" );
    LOGT( addrBuf8->Des() );

    LOGS1("CUpnpHttpServer::ConnectionAcceptedL - Creating a new Http session. Session count: %i", iSessionList.Count());

    CleanupStack::PopAndDestroy(addrBuf8);
    #endif //_DEBUG
    CUpnpHttpSession* sess = CUpnpHttpSession::NewL( aSocket, this,
        CUpnpHttpMessage::NewSessionIdL(), EPriorityNormal );

    return sess;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:33,代码来源:upnphttpserver.cpp


示例18: LOGT

void
EmbedChromeManager::WindowDestroyed(nsIDOMWindow* aWin)
{
    LOGT("WindowClosed: %p", aWin);
    nsCOMPtr<nsPIDOMWindow> pidomWindow = do_GetInterface(aWin);
    NS_ENSURE_TRUE(pidomWindow, );
    nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface(pidomWindow->GetChromeEventHandler());
    NS_ENSURE_TRUE(target, );
    nsCOMPtr<EmbedChromeListener> listener;
    int i = 0;
    for (i = 0; i < mArray.Count(); ++i) {
        if (mArray[i]->DOMWindow.get() == aWin) {
            listener = mArray[i];
            break;
        }
    }
    mArray.RemoveObjectAt(i);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_DOMContentLoaded), listener,  PR_FALSE);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_DOMLinkAdded), listener,  PR_FALSE);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_DOMWillOpenModalDialog), listener,  PR_FALSE);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_DOMModalDialogClosed), listener,  PR_FALSE);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_DOMWindowClose), listener,  PR_FALSE);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_DOMPopupBlocked), listener,  PR_FALSE);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_pageshow), listener,  PR_FALSE);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_pagehide), listener,  PR_FALSE);
    target->RemoveEventListener(NS_LITERAL_STRING(MOZ_DOMMetaAdded), listener,  PR_FALSE);
    mWindowCounter--;
    if (!mWindowCounter) {
        mService = nullptr;
    }
}
开发者ID:marmistrz,项目名称:embedlite-components,代码行数:31,代码来源:EmbedChromeManager.cpp


示例19: LOGW

int  ContextSP::_get_from_rock()
{
    if(!_rock.isopen()){return 0;}

    int         rv = 0;
    int         rsz;
    u_int8_t*   buff = _pt->buffer(rsz);

    if(_rock.set() & 0x00000001) {
        size_t sz = _rock.receive(buff, rsz);
        if(sz == 0) {
            LOGW("H R xclosed");
            _rock.destroy();
            _sock.destroy();
             return rv;
        } else  if(sz > 0) {
            buff[sz] = 0;
            int ssz = _sock.sendall(buff, sz, SS_TOUT);
            if(0 != ssz) {
                LOGW("H C xclosed");
                _rock.destroy();
                _sock.destroy();
                return rv;
            }
            LOGT("H receied ["  << sz  <<"]");
            _stats._temp_bytes[BytesStats::eIN]+=sz;
            rv=1; //was some activity
            _load = (sz *100) / rsz;
        }
        return rv;
    }
    return 1;
}
开发者ID:comarius,项目名称:buflea,代码行数:33,代码来源:contextsp.cpp


示例20: process_proxyserverpacket

void process_proxyserverpacket(struct PL_entry *player, uint8_t pkttype, void * packet)
{
  switch(pkttype)
  {
    case PID_HANDSHAKE:
    {
      struct packet_handshake* hpacket = (struct packet_handshake*) packet;
      if(bstrcmp(hpacket->username,bfromcstr("-")) != 0)
      {
	LOGT(LOG_INFO, "Remote server requires authentication");
	bufferevent_free(player->sev);
      }
      send_proxylogin(player);
      return;
    }
    case PID_LOGIN:
    {
      return; // do nothing.. for now
    }
    case PID_KEEPALIVE:
    {
      return; // do nothing
    }
  }
}
开发者ID:Coestar,项目名称:craftd,代码行数:25,代码来源:proxy-send.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LOGTEXT函数代码示例发布时间:2022-05-30
下一篇:
C++ LOGSTRING函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap