Closed Splines closed 3 days ago
haha, these emojisπ
haha, yeah I like this a lot for debugging purposes as it helps me to visually filter the relevant statements. And the icons themselves are really not that important, just that they differ from one another.
Is the old log file ever cleared?
I just reloaded the window, opened the log file, but all my old logs are still there..
(I thought the README says to reload the window - in order for the old logs to be removed?)
The log management is taken care of by VSCode itself. When you reload the window, the old log file will have the same content. However, VSCode creates a new folder in a temporary directory with a fresh new log file. Just use the Manim Notebook: Open Log File
command again.
And yes, the Readme says to reload the window, such that VSCode is creating a new logfile for us.
For me: "Manim Notebook: Open Log File" still opens the SAME log file.. Even when you REstart the extension debugging session.
What makes it open the NEW log file: STOPPING the extension debugging session. THEN starting it
So can you confirm the behavior is different than this? Note how the second log file resides in exthost17
and not exthost16
anymore (see the breadcrumbs).
https://github.com/user-attachments/assets/d0ac98c8-8361-42b1-ac0b-3aaeae496179
Yes, definitely different.
The same log file opens.
Here are these logs, you see the extension restarting:
2024-10-29 15:22:12.677 [info] [extension.js:65:21] [activate] Manim Notebook activated
2024-10-29 15:22:56.963 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
2024-10-29 15:23:00.470 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
2024-10-29 15:23:01.369 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
2024-10-29 15:23:02.037 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
2024-10-29 15:23:02.624 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
2024-10-29 15:23:03.300 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
2024-10-29 15:23:04.485 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
2024-10-29 15:23:09.581 [info] [extension.ts:69:9] [unknown] π Manim Notebook extension deactivated
2024-10-29 15:23:13.199 [info] [extension.js:65:21] [activate] Manim Notebook activated
2024-10-29 15:23:15.019 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
2024-10-29 15:23:19.077 [info] [extension.ts:51:11] [unknown] π Command requested: Open Log File
Looks like this is another MacOS-related issue for us with @bhoov ..
This can be moved to an issue as a bug, but this PR can be merged (if nobody knows how to solve this issue in this PR)
Yeah, as this PR is just adding simple log statements, fixes like these would be better suited for a subsequent one. Thanks for approving.
In #56, we introduced a new logging mechanism. Here, we make use of that to log many important steps in the program, mainly for the
ManimShell
and the code preview. Note that as described in the Readme, the default logging level isInfo
, so adding thesedebug
ortrace
logging statements should not be a performance problem.I've also added a custom
Window
class that we can use (noteW
instead ofw
). Before showing the actual notification to the user, it will also log its message with respective log levels.