當前位置: 首頁>>代碼示例>>C++>>正文


C++ BOOST_LOG_FUNCTION函數代碼示例

本文整理匯總了C++中BOOST_LOG_FUNCTION函數的典型用法代碼示例。如果您正苦於以下問題:C++ BOOST_LOG_FUNCTION函數的具體用法?C++ BOOST_LOG_FUNCTION怎麽用?C++ BOOST_LOG_FUNCTION使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了BOOST_LOG_FUNCTION函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: BOOST_LOG_FUNCTION

void  SQLCode::_BuildNormalSQL(const SQLVarParms& varParms, SQLStatement& rSQLFormats, SQLStatement& rSqlStatement)
{
	BOOST_LOG_FUNCTION();

	if (!rSQLFormats.strCommonSQL.empty())
	{
		_BuildSQL(varParms, rSQLFormats.strCommonSQL, rSqlStatement.strCommonSQL);
	}
	else
	{
		if (rSQLFormats.strOracleSQL.empty() 
			|| rSQLFormats.strMySQLSQL.empty() 
			|| rSQLFormats.strSQLiteSQL.empty())
		{
			throw DataAccessException(ER_DB_ERR_SQLCode, "The MySQL or Oracle SQL or SQLite Format is empty");
		}
		
		// build Oracle SQL Statement
		_BuildSQL(varParms, rSQLFormats.strOracleSQL, rSqlStatement.strOracleSQL, enumOracleDb);

		// build MySQL SQL statement
		_BuildSQL(varParms, rSQLFormats.strMySQLSQL, rSqlStatement.strMySQLSQL, enumMysqlDb);

		// build SqliteDb SQL Statement
		_BuildSQL(varParms, rSQLFormats.strSQLiteSQL, rSqlStatement.strSQLiteSQL, enumSqliteDb);
	}	

}
開發者ID:lslProjectOrg,項目名稱:Projects,代碼行數:28,代碼來源:SQLCode.cpp

示例2: BOOST_LOG_FUNCTION

CInstrumentTickInfo& CInstrumentTickInfo::operator=(const CInstrumentTickInfo& instrumentTickInfo )
{
	BOOST_LOG_FUNCTION();
	m_TickInfo = instrumentTickInfo.m_TickInfo;

	return *this;
}
開發者ID:lslProjectOrg,項目名稱:Projects,代碼行數:7,代碼來源:InstrumentTickInfo.cpp

示例3: BOOST_LOG_FUNCTION

//"%04d-%02d-%02d %02d:%02d:%02d"
std::string CCFDServerUtilityFun::dataTimeToStr(time_t nTimeValue)
{
	BOOST_LOG_FUNCTION();
	std::string	strTimeString;
	char* pszCurTime = NULL;
	int nBufferSize = 256;
	struct tm* pTM = NULL;
	time_t time_Value = (time_t)nTimeValue;

	pszCurTime =new char[nBufferSize];
	memset(pszCurTime, 0, nBufferSize);

	pTM = localtime(&(time_Value));

	//TIMESTR--%Y%m%d%H%M%S
	//format to string
	if ( NULL != pTM )
	{
		sprintf(pszCurTime, "%04d-%02d-%02d %02d:%02d:%02d",
			pTM->tm_year + 1900, pTM->tm_mon + 1, pTM->tm_mday,
			pTM->tm_hour, pTM->tm_min, pTM->tm_sec); 
		strTimeString = pszCurTime;     
	}

	delete pszCurTime;
	pszCurTime = NULL;
	pTM = NULL;

	return strTimeString;
}
開發者ID:lslProjectOrg,項目名稱:Projects,代碼行數:31,代碼來源:CFDServerUtilityFun.cpp

示例4: BOOST_LOG_FUNCTION

void CMarketDataFileManager::setInstrumentBarInfoRequest( const CInstrumentBarInfoRequest& instrumentBarInfoRequest )
{
	BOOST_LOG_FUNCTION();
	m_InstrumentBarInfoRequest = instrumentBarInfoRequest;
	setAnalieType(AnalierType_Dispatch_MarkketData);

}
開發者ID:lslProjectOrg,項目名稱:Projects,代碼行數:7,代碼來源:MarketDataFileManager.cpp

示例5: BOOST_LOG_FUNCTION

int CServerManager::_InitServer()
{
	BOOST_LOG_FUNCTION();
	int nFunRes = 0;

	if (g_string_strServerAddress.empty())
	{
		LOG_ERROR<<"error! g_string_strServerAddress="<<g_string_strServerAddress;
		nFunRes = -1;
		return nFunRes;
	}

	{
		boost::mutex::scoped_lock lock(m_mutexBrokerServer);
		m_brokerServer.onConnected = boost::bind(&TA_Base_App::CServerManager::handleConnected, this, _1);//static boost::arg<1> _1;
		m_brokerServer.onDisconnected = boost::bind(&TA_Base_App::CServerManager::handleDisconnected, this, _1);//static boost::arg<1> _1;
		m_brokerServer.onReceived = boost::bind(&TA_Base_App::CServerManager::handleReceivedMessage, this, _1);//static boost::arg<1> _1;
		m_brokerServer.onDeliverFailure = boost::bind(&TA_Base_App::CServerManager::handleDeliverFailure, this, _1);//static boost::arg<1> _1;

		LOG_DEBUG<< "begin listen g_string_strServerAddress="<<g_string_strServerAddress;
		m_brokerServer.listen(g_string_strServerAddress);
	}



	return nFunRes;
}
開發者ID:lslProjectOrg,項目名稱:Projects,代碼行數:27,代碼來源:ServerManager.cpp

示例6: BOOST_LOG_FUNCTION

void CConfigInfoHelper::_GetConifgFileInfo()
{
	BOOST_LOG_FUNCTION();

	CFileSystemItem::LstLineT  lstLine;
	CFileSystemItem::LstLineIterT  iterLst;

	m_pConfigFileInfo->getAllLinesInFile(lstLine);

	iterLst = lstLine.begin();
	while (iterLst != lstLine.end())
	{
		std::string strLineTmp = *iterLst;
		std::string strParamKey;

		CParamItem* pParamItem = new CParamItem(strLineTmp);
		strParamKey = pParamItem->getParamKey();
		m_MapParamKeyParamItem.insert(MapParamKeyParamItemValueTypeT(strParamKey, pParamItem));
		pParamItem = NULL;

		iterLst++;
	}//while


	lstLine.clear();

	return;
}
開發者ID:shenglonglinapple,項目名稱:slin_code,代碼行數:28,代碼來源:ConfigInfoHelper.cpp

示例7: BOOST_LOG_FUNCTION

void CConfigInfo::logInfo()
{
	BOOST_LOG_FUNCTION();

	LOG_INFO<<"CConfigInfo::logInfo"
		<<" "<<"m_strValue_ConfigFileName="<<m_strValue_ConfigFileName
		<<" "<<"m_strValue_HistoryDataDirectory="<<m_strValue_HistoryDataDirectory
		<<" "<<"m_strValue_SaveDataDirectoryBAR="<<m_strValue_SaveDataDirectoryBAR
		<<" "<<"m_strValue_SaveDataDirectoryTIK="<<m_strValue_SaveDataDirectoryTIK
		<<" "<<"m_strValue_DbType="<<m_strValue_DbType
		<<" "<<"m_strValue_StartTime_InDB="<<m_strValue_StartTime_InDB
		<<" "<<"m_strValue_StartTime_InFile="<<m_strValue_StartTime_InFile
		<<" "<<"m_strValue_LoadMaxFilesSize="<<m_strValue_LoadMaxFilesSize
		<<" "<<"m_strValue_AutoRun="<<m_strValue_AutoRun
		<<" "<<"m_strValue_AutoRunTime="<<m_strValue_AutoRunTime;

	LOG_INFO<<"CConfigInfo::logInfo"
		<<" "<<"m_nValue_DbType="<<m_nValue_DbType
		<<" "<<"m_nValue_StartTime="<<m_nValue_StartTime
		<<" "<<"m_nValue_LoadMaxFilesSize="<<m_nValue_LoadMaxFilesSize
		<<" "<<"m_nValue_AutoRun="<<m_nValue_AutoRun;

	m_pSQLiteConfigFileOperParam->logInfo();

	return;
}
開發者ID:shenglonglinapple,項目名稱:slin_code,代碼行數:26,代碼來源:ConfigInfo.cpp

示例8: BOOST_LOG_FUNCTION

int CSqliteDbOper::_CreateDBTableTick()
{
	BOOST_LOG_FUNCTION();
	int nFunRes = 0;
	bool bExecRes = true;
	std::string strSQL;

	QSqlQuery* pSqlQuery = NULL;
	pSqlQuery = new QSqlQuery(*m_pQSqlDataBaseTIK);

	strSQL = _BuildSQLForCreateDBTableTick();

	LOG_DEBUG<<"exec strSQL="<<strSQL;
	bExecRes = pSqlQuery->exec(strSQL.c_str());
	if (!bExecRes)
	{
		nFunRes = -1;
		LOG_ERROR<<"Fail to exec sql:"<<strSQL<<" error:"<<pSqlQuery->lastError().text().toStdString();
	}

	if (NULL != pSqlQuery)
	{
		delete pSqlQuery;
		pSqlQuery = NULL;
	}

	return nFunRes;
}
開發者ID:shenglonglinapple,項目名稱:slin_code,代碼行數:28,代碼來源:SqliteDbOper.cpp

示例9: BOOST_LOG_FUNCTION

int CFileSystemManager::removeOldFile(time_t nStarTime, MapTimeFileSystemItemT& mapTimeFileSystemItem )
{
	BOOST_LOG_FUNCTION();
	int nFunRes = 0;
	MapTimeFileSystemItemIterT iterMap;
	time_t nFileTime;
	CFileSystemItem* pFileSystemItem = NULL;

	iterMap = mapTimeFileSystemItem.begin();
	
	while (iterMap != mapTimeFileSystemItem.end())
	{
		nFileTime = iterMap->first;
		pFileSystemItem = iterMap->second;

		if (nFileTime <= nStarTime)
		{
			delete pFileSystemItem;
			pFileSystemItem = NULL;

			mapTimeFileSystemItem.erase(iterMap);
			iterMap = mapTimeFileSystemItem.begin();
		}
		else
		{
			iterMap++;
		}

	}

	return nFunRes;
}
開發者ID:lslProjectOrg,項目名稱:Projects,代碼行數:32,代碼來源:FileSystemManager.cpp

示例10: BOOST_LOG_FUNCTION

CMarketDataFileAnalier::CMarketDataFileAnalier(void)
{
	BOOST_LOG_FUNCTION();
	m_pUtilityFun = new CCFDServerUtilityFun();
	m_pMarketDataDispatcher = new CMarketDataDispatcher();

}
開發者ID:shenglonglinapple,項目名稱:slin_code,代碼行數:7,代碼來源:MarketDataFileAnalier.cpp

示例11: BOOST_LOG_FUNCTION

int CSyncMarketDataForCFD::_SyncLstCFDBarInfo(LstBarInfoT& lstBarInfoFirst, LstBarInfoT& lstBarInfoSecond, LstCFDBarInfoT& lstCFDBarInfo)
{
	BOOST_LOG_FUNCTION();
	int nFunRes = 0;

	LstBarInfoIterT iterLstFirst;
	LstBarInfoIterT iterLstSecond;
	MarketData* pBarFirst = NULL;
	MarketData* pBarSecond = NULL;
	CCFDInstrumentBarInfo* pCFDInstrumentBarInfoTmp = NULL;

	if (lstBarInfoFirst.size() != lstBarInfoSecond.size())
	{
		LOG_ERROR<<"_SyncLstCFDBarInfo size error!"
			<<" "<<"lstBarInfoFirst.size()="<<lstBarInfoFirst.size()
			<<" "<<"lstBarInfoSecond.size()="<<lstBarInfoSecond.size();
		nFunRes = -1;
		return nFunRes;
	}

	iterLstFirst = lstBarInfoFirst.begin();
	iterLstSecond = lstBarInfoSecond.begin();

	while (
		(iterLstFirst != lstBarInfoFirst.end())
		&& (iterLstSecond != lstBarInfoSecond.end())
		)
	{
		pBarFirst = NULL;
		pBarSecond = NULL;
		pBarFirst = (*iterLstFirst);
		pBarSecond = (*iterLstSecond);

		pCFDInstrumentBarInfoTmp =new CCFDInstrumentBarInfo(m_CFDRequest);

		pCFDInstrumentBarInfoTmp->setCFDRequest(m_CFDRequest);
		pCFDInstrumentBarInfoTmp->setBarInfoFirst(*pBarFirst);
		pCFDInstrumentBarInfoTmp->setBarInfoSecond(*pBarSecond);
		nFunRes = pCFDInstrumentBarInfoTmp->buidCFDBarInfo();
		if (0 != nFunRes)
		{
			LOG_ERROR<<"buildCFDMarketData DataFirst.Time != DataSecond.Time"
				<<" ["<<"DataFirst.Time="<<m_pUtilityFun->dataTimeToStr(pBarFirst->getTime())<<"]"
				<<" ["<<"DataSecond.Time="<<m_pUtilityFun->dataTimeToStr(pBarSecond->getTime())<<"]"; 
		}
		else
		{
			pCFDInstrumentBarInfoTmp->logInfo();
		}


		lstCFDBarInfo.push_back(pCFDInstrumentBarInfoTmp);
		pCFDInstrumentBarInfoTmp = NULL;

		iterLstFirst++;
		iterLstSecond++;
	}//while

	return nFunRes;
}
開發者ID:shenglonglinapple,項目名稱:slin_code,代碼行數:60,代碼來源:SyncMarketDataForCFD.cpp

示例12: main

int main( int argc, char* argv[] )
{
	TA_Base_Test::CBoostLogger BoostLogger;
	BOOST_LOG_FUNCTION();


	TA_Base_Test::CTestCase* pTestCase = new TA_Base_Test::CTestCase();

	if (1 == g_runAsServer)
	{
		pTestCase->runTestCase_ForServer();
	}
	else
	{
		pTestCase->runTestCase_ForClient();
	}
	//

	//sleep
	{	
		boost::mutex::scoped_lock lock(g_mutexMainRun);
		g_conditionMainRun.wait(lock);
	}

	delete pTestCase;
	pTestCase = NULL;


	return 0;
}
開發者ID:lslProjectOrg,項目名稱:Projects,代碼行數:30,代碼來源:main.cpp

示例13: BOOST_LOG_FUNCTION

CInstrumentBarInfo& CInstrumentBarInfo::operator=(const CInstrumentBarInfo& instrumentBarInfo )
{
	BOOST_LOG_FUNCTION();
	m_nInterval = instrumentBarInfo.m_nInterval;
	m_BarInfo = instrumentBarInfo.m_BarInfo;
	return *this;
}
開發者ID:shenglonglinapple,項目名稱:slin_code,代碼行數:7,代碼來源:InstrumentBarInfo.cpp

示例14: BOOST_LOG_FUNCTION

CZmqREQServerThread::CZmqREQServerThread(void)
{	
	BOOST_LOG_FUNCTION();	
	m_toTerminate = false;
	m_nThreadJobState = JobState_Begin;

}
開發者ID:shenglonglinapple,項目名稱:slin_code,代碼行數:7,代碼來源:ZmqREQServerThread.cpp

示例15: BOOST_LOG_FUNCTION

CInstrumentBarInfoRequest& CInstrumentBarInfoRequest::operator=(const CInstrumentBarInfoRequest& instrumentBarInfoRequest )
{
	BOOST_LOG_FUNCTION();
	m_strCurrentAnalierFileName = instrumentBarInfoRequest.m_strCurrentAnalierFileName;
	m_strHistoryMarketDataTotal = instrumentBarInfoRequest.m_strHistoryMarketDataTotal;
	m_strInstrumetBarInfoTotal = instrumentBarInfoRequest.m_strInstrumetBarInfoTotal;
	_AddBarTimeNormal();
	return *this;
}
開發者ID:shenglonglinapple,項目名稱:slin_code,代碼行數:9,代碼來源:InstrumentBarInfoRequest.cpp


注:本文中的BOOST_LOG_FUNCTION函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。