Skip to content

Commit

Permalink
less uitask logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed May 24, 2024
1 parent 76f6b18 commit 39d1ac7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/utils/UITask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ static LRESULT CALLBACK WndProcTaskDispatch(HWND hwnd, UINT msg, WPARAM wp, LPAR
auto func = (std::function<void()>*)lp;
int taskId = (int)wp;
// logf("uitask::WndPorcTaskDispatch: about to free func 0x%p\n", (void*)func);
auto name = seqstrings::IdxToStr(gTaskNames, taskId);
if (!name) {
name = "not found";
// don't log most frequent for less spammy logs
bool skipLog = taskId == TaskRepaintAsync;
if (!skipLog) {
auto name = seqstrings::IdxToStr(gTaskNames, taskId);
if (!name) {
name = "not found";
}
logf("uitask::WndProcTaskDispatch: will execute taskID: %d name: %s\n", taskId, name);
}
logf("uitask::WndProcTaskDispatch: will execute taskID: %d name: %s\n", taskId, name);
(*func)();
logf("uitask::WndProcTaskDispatch: did execute, will delete func 0x%p\n", (void*)func);
if (!skipLog) {
logf("uitask::WndProcTaskDispatch: did execute, will delete func 0x%p\n", (void*)func);
}
delete func;
return 0;
}
Expand Down

0 comments on commit 39d1ac7

Please sign in to comment.