-
Notifications
You must be signed in to change notification settings - Fork 6
Init logging mechanism #56
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
Conversation
Many VSCode commands are actually capitalized.
|
Thanks @VladimirFokow, that's a good idea, otherwise users might complain about performance. I've also updated the Regex to match another case, see the docstrings. And include the line number. As approvals don't get dismissed when adding new commits (due to repo settings): do you still approve? |
yes |
In this PR, we init the
Logger
class to log to theManim Notebook
output pane in VSCode as well as to a dedicated log file. For users to access this log file, we add aManim Notebook: Open log file
command. I've also included a section in the Readme explaining how to report an issue using this log file.As I had to search way too long to find the relevant information on how to log in a VSCode extension, I've also written a StackOverflow answer.
A subsequent PR will then add respective
Logger.trace()
etc. statements at important places in the code.Known limitations
The line and colon numbers refer to the position in the transpiled
.js
. I haven't yet bothered about generating source maps via the TypeScript compiler to then map the positions to those in the original.ts
file. I don't even know if these maps would get distributed on the VSCode marketplace.We can still (later on) write a small script for ourselves that takes in a given user log and the Manim Notebook version used, then checks out the respective code on GitHub, generates the source maps and replaces the corresponding line and colon numbers in the log file.