-
Notifications
You must be signed in to change notification settings - Fork 28
Use VS Code's LogOutputChannel for logging #553
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
base: main
Are you sure you want to change the base?
Conversation
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.
I had no idea this existed! Awesome.
Ah and I mentioned
I think you are right, looking at the |
…g from error to warn
Probably requires another review now that I replaced all the calls of |
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.
🎉
HI @EhabY. Thanks for your contribution. Could you also add the change to https://github.com/coder/vscode-coder/blob/main/CHANGELOG.md |
Added the change to the changlog |
Ah right yeah, adding a line to the changelog in the PR is the best way yeah. |
CHANGELOG.md
Outdated
- Use `LogOutputChannel` for the Coder output channel and ensure messages are logged | ||
with the appropriate log level. |
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.
I would word it to be more user-centric, like how does this affect the user and what can/should they do about it?
Something like this maybe:
Respect log levels. In the Coder output panel, you can now select the log level to filter messages.
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.
Added the following:
Coder output panel enhancements: All log entries now include timestamps, and you can filter messages by log level in the panel.
71d9254
to
029711f
Compare
closes #257
In this PR I create a
LogOutputChannel
instead of the oldOutputChannel
. By default,appendLine
uses theinfo
logging level so I usedinfo
to log most messages, except errors where theerror
level was used.I think all of the info can be downgraded into
debug
level actually, and the errors could be downgraded intowarn
since they are handled or thrown right away. What do you think?