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

Improve logging #77

Open
maninak opened this issue Sep 20, 2023 · 0 comments
Open

Improve logging #77

maninak opened this issue Sep 20, 2023 · 0 comments
Labels
enhancement New feature extending the app's current capabilities

Comments

@maninak
Copy link
Collaborator

maninak commented Sep 20, 2023

Currently, we log bare strings in the Output Panel, when logging. Each log entry's string is manually prefixed with a timestamp and severity. The result looks like this:

Image

But there's a better way to do it:

Image

In the example above, the timestamp is automatically resolved, the text is parsed and colorized making it much more readable, and most importantly the severity is declaratively defined in a way that VS Code can parse it. This not only allows the user to set their desired log verbosity level

Image

but also us as extension authors to log a lot more events (which could ease production debugging, issue reporting and reproduction) without fear that we will produce too much noice. Especially given the fact that there are more log levels than we're using now

Image

Acceptance Criteria

  1. our logs look like the nice image above, colorized, better timestamp etc
  2. every successful shell command execution (i.e. using exec()) is logged by default, using trace level
  3. care is taken to migrate each existing calls to exec() and keep logging things we already do while also not logging things we already don't want to log
  4. logs are produced when a file or config watcher is triggered
  5. logs are produced when a command is triggered
  6. logs are produced when HTTP requests get sent
  7. the above ACs are revisited to ensure they are sensible and also nothing else is missing

NOTES:

@maninak maninak converted this from a draft issue Sep 20, 2023
@maninak maninak added the enhancement New feature extending the app's current capabilities label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature extending the app's current capabilities
Projects
Status: 🆕 Backlog
Development

No branches or pull requests

1 participant