Skip to content
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

feat: log to outputChannel #2623

Merged
merged 8 commits into from May 9, 2018
Merged

feat: log to outputChannel #2623

merged 8 commits into from May 9, 2018

Conversation

jpoon
Copy link
Member

@jpoon jpoon commented May 7, 2018

What this PR does / why we need it:

  • Initial implementation of logger which logs messages to the output channel
  • Hopefully, as we start logging more output messages, users can get more insight on what's going on and if there are any issues, help with debugging.

Which issue(s) this PR fixes

Special notes for your reviewer:


// Handle scenarios where mouse used to change current position.
const disposable = vscode.window.onDidChangeTextEditorSelection(e => {
if (configuration.disableExt) {
return;
}

if (Globals.isTesting) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think this is better here instead of in the actual handler?

Do you know that the handler was only called from here?

Copy link
Member Author

@jpoon jpoon May 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh, I moved it because I didn't see a reason for it to be in the actual handler. This is the only spot the handler is being called from and to save us from queuing something onto our task queue only to exit shortly thereafter seemed wasteful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, we just don't test this function at all so it terrifies me

@xconverge
Copy link
Member

This is really cool though!

@jpoon jpoon force-pushed the log branch 2 times, most recently from 46229bf to feec55b Compare May 8, 2018 20:38
@jpoon jpoon merged commit 5b925ec into master May 9, 2018
@jpoon jpoon deleted the log branch May 9, 2018 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants