Skip to content

Call logging class #1555

Answered by msujew
so195 asked this question in Q&A
Jun 20, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Thanks for the code! However, I cannot reproduce your issue, as the library correctly logs the data to a file (in the open VS Code workspace, since it's the cwd of the vscode extension).

{"label":"AppLogger","level":"info","message":"Info 1"}
{"label":"main file","level":"info","message":"Info 3"}

You might want to be a bit more specific about the filepath you're using. Maybe something like __dirname + '/log.log' instead to ensure that the log is created in the same directory where the language server is located?

Is there any way to allow writing to the console?

Note that you can still write to console.log, but the log is rerouted to a different channel - when running in vscode, it will…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@so195
Comment options

@msujew
Comment options

Answer selected by so195
@so195
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants