-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[FancyZones Editor] Logger #13928
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
[FancyZones Editor] Logger #13928
Conversation
|
|
||
| var methodName = stackTrace.GetFrame(3)?.GetMethod(); | ||
| var className = methodName?.DeclaringType.Name; | ||
| return className + " :: " + methodName?.Name; |
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.
nit: "::" instead of " :: ".
[16:51:56.7245037] [Info] LayoutPreview::OnLoaded
looks better than
[16:51:56.7245037] [Info] LayoutPreview :: OnLoaded
IMHO
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.
Also, when searching logs, I would expect no space there
| _eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, interop.Constants.FZEExitEvent()); | ||
| if (_eventHandle.WaitOne()) | ||
| { | ||
| Logger.LogInfo("FancyZones disabled, exit"); |
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.
is this correct? I believe FZ is not disabled here? -> e.g "FanzyZones Editor exit event processed"
stefansjfw
left a comment
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.
Looks good! This should help us a lot with reproducing bugs! Let's not forget to add more logging when we change/add some code or see that log could be useful at some place
jaimecbernardo
left a comment
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.
Rubberstamp LGTM!
Using logger instead of manually is good.
Summary of the Pull Request
What is this about:
Added logger to the FZ Editor.
It also could help with issues such as #13105 to analyze repro steps.
What is include in the PR:
How does someone test / validate:
Quality Checklist
Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.