You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our VSCode extension we use simple console.log() and console.error() functions to print debugging-related stuff. It does help a lot, but it has quite a few big flaws.
Users' dev console gets littered with our log messages
Other extensions console.log() go to the same shared console that also doesn't help
Console logs are not permanent, they are destroyed upon VSCode reload
Nested objects in console are collapsed, and we need to ask users to do work and expand them for our needs.
Proposal
At the end of they day we need to record logs in files (put them in ExtensionHost.logPath)
The initial proposal for the infrastructure was stated by @matklad in this comment.
We currently haven't agreed on the exact design of logging. So this is need to be done yet.
Just a quick-and-not-yet-ultimate thought from me: I'd like to propose some logger package like pino.
If anybody has some design proposal, it would be great to hear from you! Anyway, once I have time, I'll take it to investigate what we can do here and post my thoughts here so we can agree on the final shape of our logging infra.
Rationale
In our VSCode extension we use simple
console.log()
andconsole.error()
functions to print debugging-related stuff. It does help a lot, but it has quite a few big flaws.console.log()
go to the same shared console that also doesn't helpProposal
At the end of they day we need to record logs in files (put them in
ExtensionHost.logPath
)The initial proposal for the infrastructure was stated by @matklad in this comment.
We currently haven't agreed on the exact design of logging. So this is need to be done yet.
Just a quick-and-not-yet-ultimate thought from me: I'd like to propose some logger package like
pino.
If anybody has some design proposal, it would be great to hear from you! Anyway, once I have time, I'll take it to investigate what we can do here and post my thoughts here so we can agree on the final shape of our logging infra.
References
logPath
vscode APIThe text was updated successfully, but these errors were encountered: