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

Logs should go to Output pane channel rather than dev console #460

Closed
4 tasks done
ulugbekna opened this issue Aug 27, 2024 · 3 comments
Closed
4 tasks done

Logs should go to Output pane channel rather than dev console #460

ulugbekna opened this issue Aug 27, 2024 · 3 comments
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)

Comments

@ulugbekna
Copy link

Clear and concise description of the problem

It's a best practice for vscode extensions that the logs go to the Output pane channel rather than dev tools console because dev console contains lots of info and errors unrelated to the extension while the output channel is dedicated to the extension. It's a lot user friendlier for extension users to consume. Using log infra also allows filtering logs by log-level (eg trace, debug, info, etc)

Suggested solution

It's preferable to use https://code.visualstudio.com/api/references/vscode-api#LogOutputChannel.

Alternative

No response

Additional context

No response

Validations

@sheremet-va
Copy link
Member

What do you mean? This is how we already log: https://github.com/vitest-dev/vscode/blob/main/src/log.ts

@ulugbekna
Copy link
Author

Thank you for prompt reply @sheremet-va !

I see these logs in dev console:

Image

@sheremet-va
Copy link
Member

Maybe we should console.log them only for dev builds then. These logs are duplicated both in Output and Debug.

@sheremet-va sheremet-va added p2-edge-case Bug, but has workaround or limited in scope (priority) and removed enhancement: pending triage labels Sep 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

No branches or pull requests

2 participants