本文整理汇总了C++中LogTrace函数的典型用法代码示例。如果您正苦于以下问题:C++ LogTrace函数的具体用法?C++ LogTrace怎么用?C++ LogTrace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LogTrace函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: SendMessageReplyError
void CEsperEngine::MsgEsperRead (const SArchonMessage &Msg)
// MsgEsperRead
//
// Requests a read on the given connection. If we fail, we return an error
// to the caller.
{
CDatum dConnection = Msg.dPayload.GetElement(0);
CString sError;
if (!m_Connections.BeginRead(Msg, dConnection, &sError))
{
SendMessageReplyError(MSG_ERROR_UNABLE_TO_COMPLY, strPattern(ERR_READ_FAILED, sError), Msg);
if (m_bLogTrace)
LogTrace(strPattern("[%x] Read failed: %s", CEsperInterface::ConnectionToFriendlyID(dConnection), sError));
return;
}
#ifdef DEBUG_SOCKET_OPS
if (m_bLogTrace)
LogTrace(strPattern("[%x] Read", CEsperInterface::ConnectionToFriendlyID(dConnection)));
#endif
// We reply when the async operation completes (or we get an error).
}
开发者ID:gmoromisato,项目名称:Hexarc,代码行数:27,代码来源:CEsperEngine.cpp
示例2: LogTrace
bool TCPServer::Listen(int port)
{
LogTrace(LOG_NETWORKING, "Listening for incoming connections {port: %d}", port);
struct sockaddr_in bind_address;
uv_ip4_addr("0.0.0.0", port, &bind_address);
int result = uv_tcp_init(uv_default_loop(), &_listener);
if (result)
{
LogError(LOG_NETWORKING, "Listening for incoming connections - failure, reason: %s", uv_err_name(result));
return false;
}
result = uv_tcp_bind(&_listener, (const struct sockaddr *) &bind_address, 0);
if (result)
{
LogError(LOG_NETWORKING, "Listening for incoming connections - failure, reason: %s", uv_err_name(result));
return false;
}
result = uv_listen((uv_stream_t *) &_listener, SOMAXCONN, IncomingConnection);
if (result)
{
LogError(LOG_NETWORKING, "Listening for incoming connections - failure, reason: %s", uv_err_name(result));
return false;
}
LogTrace(LOG_NETWORKING, "Listening for incoming connections - success", port);
return true;
}
开发者ID:LithiumToast,项目名称:ankura,代码行数:31,代码来源:TCPServer.cpp
示例3: operator
void ExecutorDummy::printSyncs()
{
typedef pair<string, uint64_t> Record;
struct comp
{
bool operator()(Record const &a, Record const &b) const
{
return a.second > b.second;
}
};
vector<Record> sorted;
sorted.reserve(syncs_.size());
for (auto &r : syncs_)
{
string str = methods_->getMethod(r.first).second;
sorted.emplace_back(str, r.second);
}
std::sort(sorted.begin(), sorted.end(), comp());
size_t num = std::min<size_t>(10, sorted.size());
LogTrace("sync stats: " << numFrames_ << " frames");
for (size_t i = 0; i < num; ++i)
LogTrace(sorted[i].first << ": " << sorted[i].second);
syncs_.clear();
numFrames_ = 0;
}
开发者ID:vasily-knk,项目名称:D3Digger,代码行数:29,代码来源:ExecutorDummy.cpp
示例4: __UpdateBackendPath
static FORCEINLINE NTSTATUS
__UpdateBackendPath(
IN PXENVBD_FRONTEND Frontend
)
{
NTSTATUS Status;
PCHAR Path;
if (Frontend->BackendPath) {
LogTrace("<< %s\n", Frontend->BackendPath);
AustereFree(Frontend->BackendPath);
Frontend->BackendPath = NULL;
}
Status = StoreRead(NULL, Frontend->FrontendPath,
"backend-id", &Path);
if (NT_SUCCESS(Status)) {
Frontend->BackendId = (USHORT)strtoul(Path, NULL, 10);
AustereFree(Path);
} else {
Frontend->BackendId = 0;
}
Status = StoreRead(NULL, Frontend->FrontendPath,
"backend", &Path);
if (NT_SUCCESS(Status)) {
LogTrace(">> %s\n", Path);
Frontend->BackendPath = Path;
}
return Status;
}
开发者ID:OwenSmith,项目名称:patchq-xenvbd,代码行数:32,代码来源:frontend.c
示例5: UnhookCreateDXGIFactory2Function
/// Helper function to unhook the CreateFactory2 interface
/// \param hDXGI Input DXGI module
void UnhookCreateDXGIFactory2Function(HMODULE hDXGI)
{
LogTrace(traceENTER, "");
// don't detach twice
if (Real_CreateDXGIFactory2 == NULL)
{
Log(logERROR, "Attempting to call UnhookCreateDXGIFactory2() twice\n");
LogTrace(traceEXIT, "");
return;
}
if (hDXGI != NULL)
{
LONG error;
AMDT::BeginHook();
LogTrace(traceEXIT, "UnhookCreateDXGIFactory2");
UNHOOK(Real_CreateDXGIFactory2, Mine_CreateDXGIFactory2);
if (AMDT::EndHook() != NO_ERROR)
{
Log(logERROR, "UnhookCreateDXGIFactory2 Failed\n");
}
}
Real_CreateDXGIFactory2 = NULL;
LogTrace(traceEXIT, "");
return;
}
开发者ID:PlusChie,项目名称:CodeXL,代码行数:35,代码来源:DXGIHookDXGIFactory2.cpp
示例6: LogTrace
void SysConsoleServiceImp::updateLocalGid(std::string& _return, const int32_t localGid, const int32_t groupId, const int64_t timestamp, const std::string& oldIp, const std::string& newIp)
{
LogTrace(Info, "localGid = %d, groupId = %d, oldipStr = %s, newIP = %s", localGid, groupId, oldIp.c_str(), newIp.c_str());
if(!(localGid>=2048 && localGid<=4097))
{
_return = "invalid localGid";
return;
}
IMetaDao *metaDao_mp = sysc->mDao;
Meta m;
m.serverId= localGid;
m.timestamp = sysc->nv->getVersion();
m.name = LOCALGIDMETANAME;
m.groupId = groupId;
m.type = METASERVER_TYPE;
m.data = newIp;
m.isDel = 0;
if(metaDao_mp->updateLocalGid(m,oldIp,timestamp) == -1)
{
LogTrace(Error,"config localGid error, err= %d", myerrno);
char buf[100];
sprintf(buf, "setMeta db error:%d", myerrno);
_return = buf;
}else{
_return = "config ok";
}
}
开发者ID:zhangchuhu,项目名称:s2s,代码行数:29,代码来源:SysConsoleServer.cpp
示例7: onFailure
JobStatus FullSnapJob::onSyncLsn(bool bto, int res)
{
if(bto || res != 0){
return onFailure(bto, res);
}else{
std::vector<Lsn> tmpLsns;
for(std::vector<DLog>::const_iterator it = logs.begin(); it != logs.end(); ++it){
Lsn tmp;
tmp.node = it->node;
tmp.lsn = it->lsn;
tmpLsns.push_back(tmp);
LogTrace(Info, "node = %d, lsn = %lld",tmp.node, tmp.lsn);
}
logs.clear();
cli->lastLsn.swap(tmpLsns); // update session sync's lastlsns
if(cli->lastLsn.empty())
{
LogTrace(Error,"last lsn is empty");
complete = true;
cli->snapGameover = true;
return JOBSTOP;
}
lsnVecIndex = 0;
lastLsnId = 0;
step = SyncDLog_C;
ASYNC_CALL(SnapService, getDLogs, &FullSnapJob::onSyncLog, logs, sessionId,cli->lastLsn[lsnVecIndex].node,lastLsnId,1000);
return SYSDEFAULT;
}
}
开发者ID:zhangchuhu,项目名称:s2s,代码行数:33,代码来源:FullSnapClient.cpp
示例8: LogTrace
/// 終了処理
/// 全てのメモリ開放
void Graphics::term(void)
{
LogTrace("start\n");
mGeom.term();
mWnd.term();
LogTrace("end \n");
}
开发者ID:kgussan,项目名称:libofl,代码行数:9,代码来源:graphics.cpp
示例9: LogTrace
DWORD WINAPI CardDeleteContext
(
__inout PCARD_DATA pCardData
)
{
DWORD dwReturn = 0;
LogTrace(LOGTYPE_INFO, WHERE, "Enter API...");
/********************/
/* Check Parameters */
/********************/
if ( pCardData == NULL )
{
LogTrace(LOGTYPE_ERROR, WHERE, "Invalid parameter [pCardData]");
CLEANUP(SCARD_E_INVALID_PARAMETER);
}
LogTrace(LOGTYPE_INFO, WHERE, "Context:[0x%08X]", pCardData->hSCardCtx);
if (pCardData->pvVendorSpecific != NULL)
{
pCardData->pfnCspFree(pCardData->pvVendorSpecific);
pCardData->pvVendorSpecific = NULL;
}
cleanup:
LogTrace(LOGTYPE_INFO, WHERE, "Exit API...");
return (dwReturn);
}
开发者ID:Fedict,项目名称:eid-mw,代码行数:31,代码来源:InitAndDeconstruct.c
示例10: Stealth_CheckSuccess
int32 Stealth_CheckSuccess(AActor* oStealther, AActor* oPerceiver)
{
//TODO implement Stealth_CheckSuccess fully
LogTrace(LOG_CHANNEL_COMBAT_ABILITY, "Perception check for " + GetTag(oPerceiver) + " detecting " + GetTag(oStealther));
int32 bCombatState = GetCombatState(oStealther);
int32 nStealthRank = Stealth_GetStealthRank(oStealther);
int32 nPerceptionRank = Stealth_GetPerceptionRank(oPerceiver);
if ((bCombatState == FALSE_) || (nStealthRank >= nPerceptionRank))
{
return TRUE_;
}
else
{
#ifdef DEBUG
LogTrace(LOG_CHANNEL_COMBAT_ABILITY, "DETECTED by " + GetTag(oPerceiver));
#endif
// display stealth detected UI message
UI_DisplayMessage(oStealther, 3511);
UI_DisplayMessage(oPerceiver, 3513);
return FALSE_;
}
}
开发者ID:dhk-room101,项目名称:da2ue4,代码行数:26,代码来源:sys_stealth_h.cpp
示例11: FrontendDestroy
VOID
FrontendDestroy(
IN PXENVBD_FRONTEND Frontend
)
{
const ULONG TargetId = Frontend->TargetId;
LogTrace("Target[%d] @ (%d) =====>\n", TargetId, KeGetCurrentIrql());
ASSERT3U(Frontend->RingGrantRef, ==, 0);
ASSERT3P(Frontend->EvtchnPort, ==, 0);
// free memory
if (Frontend->FrontendPath) {
AustereFree(Frontend->FrontendPath);
Frontend->FrontendPath = NULL;
}
if (Frontend->TargetPath) {
AustereFree(Frontend->TargetPath);
Frontend->TargetPath = NULL;
}
if (Frontend->BackendPath) {
AustereFree(Frontend->BackendPath);
Frontend->BackendPath = NULL;
}
LogTrace("Target[%d] @ (%d) <=====\n", TargetId, KeGetCurrentIrql());
}
开发者ID:OwenSmith,项目名称:patchq-xenvbd,代码行数:28,代码来源:frontend.c
示例12: HookCreateDXGIFactory2Function
/// Helper function to hook the CreateFactory2 interface
/// \param hDXGI Input DXGI module
void HookCreateDXGIFactory2Function(HMODULE hDXGI)
{
LogTrace(traceENTER, "");
// don't attach twice
if (Real_CreateDXGIFactory2 != NULL)
{
LogTrace(traceEXIT, "already hooked");
return;
}
Real_CreateDXGIFactory2 = (CreateDXGIFactory2_type)GetProcAddress(hDXGI, "CreateDXGIFactory2");
if (Real_CreateDXGIFactory2 != NULL)
{
LONG error;
AMDT::BeginHook();
HOOK(Real_CreateDXGIFactory2, Mine_CreateDXGIFactory2);
if (AMDT::EndHook() != NO_ERROR)
{
Log(logERROR, "HookCreateDXGIFactory2 Failed\n");
}
}
else
{
Log(logERROR, "HookCreateDXGIFactory2 Failed: Cannot find the CreateDXGIFactory2 in the current DXGI module. This is not a real error if you are using Windows7.\n");
}
LogTrace(traceEXIT, "");
return;
}
开发者ID:PlusChie,项目名称:CodeXL,代码行数:35,代码来源:DXGIHookDXGIFactory2.cpp
示例13: Mine_LoadLibraryExW
/// Mine entry point for intercepted function
/// \param lpLibFileName Library file name
/// \param hFile File handle
/// \param dwFlags load flags
/// \return Loaded module.
static HMODULE WINAPI Mine_LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
RefTracker rf(&s_dwInsideLoadLibrary);
if (s_dwInsideLoadLibrary == 1)
{
LogTrace(traceENTER, "lpLibFilename = %S, hFile = %p, dwFlags = %d", lpLibFileName, hFile, dwFlags);
}
HMODULE res = Real_LoadLibraryExW(lpLibFileName, hFile, dwFlags);
DWORD realError = GetLastError();
if (my_lstrcmpW(lpLibFileName, L"comctl32.dll") != 0)
{
// This function uses MessageBox - which will load comctl32.dll if necessary
// To avoid recursion problems, only call it when a different DLL is being loaded.
CheckForDebuggerAttach();
}
if (s_dwInsideLoadLibrary == 1)
{
CheckWrappers();
LogTrace(traceEXIT, "returned 0x%p", res);
}
SetLastError(realError);
return res;
}
开发者ID:StephenThomasUWTSD,项目名称:CodeXL,代码行数:33,代码来源:LoadLibrary.cpp
示例14: HookLoadLibrary
/// Hook the load library functions
void HookLoadLibrary()
{
LogTrace(traceENTER, "");
AMDT::BeginHook();
LONG error = AMDT::HookAPICall(&(PVOID&)Real_LoadLibraryA, Mine_LoadLibraryA);
PsAssert(error == NO_ERROR);
error = AMDT::HookAPICall(&(PVOID&)Real_LoadLibraryExA, Mine_LoadLibraryExA);
PsAssert(error == NO_ERROR);
error = AMDT::HookAPICall(&(PVOID&)Real_LoadLibraryW, Mine_LoadLibraryW);
PsAssert(error == NO_ERROR);
error = AMDT::HookAPICall(&(PVOID&)Real_LoadLibraryExW, Mine_LoadLibraryExW);
PsAssert(error == NO_ERROR);
error = AMDT::HookAPICall(&(PVOID&)Real_FreeLibrary, Mine_FreeLibrary);
PsAssert(error == NO_ERROR);
if (AMDT::EndHook() != NO_ERROR)
{
Log(logERROR, "HookLoadLibrary() failed\n");
}
// Load the "dxgi.dll" at the beginning as we missed the dxgi loading sometimes.
// TODO: Fix this: This function is called from DllMain(), and according to the
// Microsoft documentation, LoadLibrary() should not be called from DllMain()
LoadLibraryA("dxgi.dll");
LogTrace(traceEXIT, "");
return;
}
开发者ID:StephenThomasUWTSD,项目名称:CodeXL,代码行数:35,代码来源:LoadLibrary.cpp
示例15: DllInitialize
NTSTATUS
DllInitialize(
IN PUNICODE_STRING RegistryPath
)
{
PWSTR Name;
NTSTATUS Status;
LogTrace("===>\n");
Name = wcsrchr(RegistryPath->Buffer, L'\\');
if (Name) {
Name++;
if (__StrStarts(Name, L"dump_")) {
__OperatingMode = DUMP_MODE;
} else if (__StrStarts(Name, L"hiber_")) {
__OperatingMode = HIBER_MODE;
} else {
__OperatingMode = NORMAL_MODE;
}
}
Status = STATUS_SUCCESS;
LogTrace("<=== (%08x)\n", Status);
return Status;
}
开发者ID:OwenSmith,项目名称:win-xenvbd,代码行数:25,代码来源:driver.c
示例16: TraceFunc
bool FrameImpl::LoadFromBfd(void* address)
{
TraceFunc();
LogTraceLn();
bool ret = false;
m_address = address;
#if defined(__GNUC__) && defined(DEBUG)
const char* file = nullptr;
const char* func = nullptr;
bfd_fill(file, func, m_line, m_image.c_str(), m_address);
LogTrace(L"file: '%S'\n", file);
LogTrace(L"func: '%S'\n", func);
LogTrace(L"line: %Id\n", m_line);
LogTrace(L"offs: %Id\n", m_offset);
if (file)
m_file = sstr::cp2w(filename_only(file), CP_OEMCP);
if (func) {
char buf[MAX_PATH];
size_t size = sizeof(buf);
int st = 0;
abi::__cxa_demangle(func, buf, &size, &st);
m_function = sstr::cp2w(st ? func : buf, CP_OEMCP);
}
ret = file || func;
#endif
TraceFunc();
return ret;
}
开发者ID:pombreda,项目名称:main,代码行数:29,代码来源:traceback.cpp
示例17: LogTrace
JobStatus FullSnapJob::onMessage(const Message &msg)
{
LogTrace(Debug,"Metahod Entry, msgId = %d", msg.msgId);
JobStatus ret = JOBSTOP;
switch(msg.msgId)
{
case DNS:
//impxxx set client conn factory
LogTrace(Notice, "dsn result, %d", msg.shortArg );
if(msg.longArg != 0)
{
std::vector<std::string>* ipv = (std::vector<std::string>*)msg.longArg;
cli->ipListFromDns.swap(*ipv);
delete ipv;
ret = doReconnect();
}
else
{
LogTrace(Error, "Dns failure, get no host");
}
break;
default:
{
LogTrace(Error, "invalid msgId = %d", msg.msgId);
}
}
return ret;
}
开发者ID:zhangchuhu,项目名称:s2s,代码行数:29,代码来源:FullSnapClient.cpp
示例18: LogTrace
sync::WaitResult_t Pool::wait_all(int64_t timeout) const
{
LogTrace("timeout: %Id", timeout);
sync::WaitResult_t ret = (sync::WaitResult_t)::WaitForMultipleObjectsEx(m_handles.size(), &m_handles[0], TRUE, timeout, TRUE);
LogErrorIf(ret == sync::WaitResult_t::FAILED, "-> %s", totext::api_error().c_str());
LogTrace("ret: '%s'", totext::c_str(ret));
return ret;
}
开发者ID:andrew-grechkin,项目名称:cpp,代码行数:8,代码来源:thread_Pool.cpp
示例19: angel_SelectNextTask
void
angel_SelectNextTask(void)
{
angel_TaskQueueItem *tqi;
/* Find the task with the highest priority which is not blocked */
for (tqi = angel_TaskQueueHead; tqi != NULL; tqi = tqi->next)
{
/* Ignore this task if it is the application or an Appl Callback
* and the Application is blocked
*/
if (angel_ApplicationBlocked &&
(tqi->pri == TP_Application || tqi->pri == TP_ApplCallBack))
{
LogTrace2("SNT-SKIP-t%d-p%d ", tqi->index, tqi->pri);
continue;
}
/* Otherwise this is the highest priority task so execute it ! */
#ifdef DEBUG_TASKS
LogInfo(LOG_SERLOCK, ("SelectNewTask: Selecting pc %x - t%d - p%d - n%d ",
tqi->rb.r[15], tqi->index, tqi->pri, tqi->new_task));
#endif
angel_LastExecutedTaskPriority = tqi->pri;
angel_FreeToPool(tqi->index);
#if 0
if (tqi->pri == TP_Application)
{
int i;
LogWarning(LOG_SERLOCK, ( "Application starting:\n"));
for (i = 0; i < 16; i++)
{
LogWarning(LOG_SERLOCK, ( "%8X ", tqi->rb.r[i]));
}
LogWarning(LOG_SERLOCK, ( "CPSR=%8X\n", tqi->rb.cpsr));
}
#endif
/* if it's not an interrupted thread, we need to set its environment */
if (tqi->new_task)
angel_SetUpTaskEnvironment(&(tqi->rb), angel_LastExecutedTaskPriority);
else
LogTrace("\n");
angel_StartTask(&(tqi->rb)); /* doesn't return! */
}
if (tqi == NULL)
{
LogTrace("SNT-IDLE ");
angel_LastExecutedTaskPriority = TP_IdleLoop;
angel_IdleLoop();
}
}
开发者ID:lawliet89,项目名称:pascal2arm,代码行数:58,代码来源:serlock.c
示例20: LogTrace
//修改上下文菜单
HRESULT CCCopyPathEx::QueryContextMenu (HMENU hmenu,
UINT uMenuIndex,
UINT uidFirstCmd,
UINT uidLastCmd,
UINT uFlags)
{
try
{
UINT idCmd = uidFirstCmd;
LogTrace("菜单值:%d", hmenu);
// Add the new item
::InsertMenu(hmenu, uMenuIndex, MF_STRING | MF_BYPOSITION, idCmd++,
(1 == m_cFiles ? _T("Copy &Path2") : _T("Copy All &Path2") ) );
LogTrace("菜单值:%d", hmenu);
HMENU hmenu1 =::CreatePopupMenu();
UINT idCmd1 = 0;
::InsertMenu(hmenu1, uMenuIndex, MF_STRING , idCmd1++, "test1");
::InsertMenu(hmenu1, uMenuIndex, MF_STRING , idCmd1++, "test2");
::AppendMenu(hmenu, MF_POPUP, (UINT_PTR)hmenu1, "test");
// Very carefully, add the bitmap. This bitmap is XORed by the shell, so it won't
// look very pretty, but it's better than nothing. The next step is apparently to
// create an ownerdraw menu and handle painting the icon with IContextMenu3::HandleMenuMsg2
// so the icons will look pretty like the 'Send To' icons.
//const HINSTANCE hinst = _AtlBaseModule.GetResourceInstance();
//if ( hinst )
//{
// // Add the bitmap for the unchecked state, since that's what it is by default.
// m_hbmpUnchecked = ::LoadBitmap( hinst, MAKEINTRESOURCE(IDB_COPY_PATH) );
// if ( m_hbmpUnchecked )
// {
// ::SetMenuItemBitmaps( hmenu, uMenuIndex, MF_BYPOSITION, m_hbmpUnchecked, NULL );
// }
//}
return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, idCmd - uidFirstCmd);
} catch ( ... )
{
return E_FAIL;
}
//// 如果标志包含 CMF_DEFAULTONLY 我们不作任何事情.
//if ( uFlags & CMF_DEFAULTONLY )
//{
// return MAKE_HRESULT ( SEVERITY_SUCCESS, FACILITY_NULL, 0 );
//}
//InsertMenu ( hmenu, uMenuIndex, MF_BYPOSITION, uidFirstCmd, _T("SimpleShlExt Test Item") );
//return MAKE_HRESULT ( SEVERITY_SUCCESS, FACILITY_NULL, 1 );
}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:57,代码来源:CCopyPathEx.cpp
注:本文中的LogTrace函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论