-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(windows): clean up logging #11921
Conversation
* Remove unused parameters from SendDebugMessage functions * Add SendDebugEntry and SendDebugExit functions for tracking function entry/exit * Add indenting and function names to log entries * Remove unused debug functions * Eliminate now-unused hwnd parameter in initialization functions * Replace Log,LogEntry,LogExit functions with SendDebug equivalents in kmtip Many functions now have SendDebugEntry/SendDebugExit (or return_SendDebugExit) pairs. It is important to SendDebugExit on all returns from a function to keep the log indent depth consistent. In some cases I chose not to add these logging calls, e.g. on frequently called functions such as the message hooks.
User Test ResultsTest specification and instructions
Test Artifacts
|
Test Results
|
@@ -206,7 +206,7 @@ BOOL RegistryReadOnly::WrapError(DWORD res) | |||
{ | |||
/*if(res != ERROR_SUCCESS) | |||
{ | |||
SendDebugMessageFormat(0,KDS_PROGRAM,0,"RegistryFullAccess::WrapError = %d", res); | |||
__logerror(0,KDS_PROGRAM,0,"RegistryFullAccess::WrapError = %d", res); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is commented out; just removing ref to SendDebugMessageFormat as this is a shared file
Noteː there may be something going on with performance once debugging is enabled -- I was finding significant lag while the debugging was enabled. Needs further verification before we merge |
Need to disable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment about the va_end(args);
lgtm
Co-authored-by: rc-swag <[email protected]>
Co-authored-by: rc-swag <[email protected]>
Co-authored-by: rc-swag <[email protected]>
Changes in this pull request will be available for download in Keyman version 18.0.77-alpha |
SendDebugMessage*
functionsSendDebugEntry
andSendDebugExit
functions for tracking function entry/exithwnd
parameter in initialization functionsLog
,LogEntry
,LogExit
functions withSendDebug*
equivalents in kmtipKeyman_WriteDebugEvent2W
,Keyman_SendDebugEntry
,Keyman_SendDebugExit
Many functions now have
SendDebugEntry
/SendDebugExit
(orreturn_SendDebugExit
) pairs. It is important toSendDebugExit
on all returns from a function to keep the log indent depth consistent. In some cases I chose not to add these logging calls, e.g. on frequently called functions such as the message hooks.User Testing