Manim-Notebook / manim-notebook

Simple commands to replicate the manim dev workflow in VSCode
MIT License
5 stars 0 forks source link

Init Log Recording sessions #59

Closed Splines closed 2 days ago

Splines commented 3 days ago

Fixes #58. Fixes #60.

In this PR, we pimp up the logging mechanism and introduce the concept of a "Logging session", i.e. users can start a logging session. When ending it, the log file will automatically open. Please make sure the updated steps of the Troubleshooting section work for you with this PR.

image

When reviewing, please make sure that the following works additionally:

VladimirFokow commented 3 days ago

dispose didn't help:

2024-10-29 15:54:55.359 [info] [extension.js:65:21] [activate] Manim Notebook activated
2024-10-29 15:54:55.359 [info] [logger.js:53:16] [unknown] Operating system: Darwin 23.6.0 arm64
2024-10-29 15:54:55.359 [info] [logger.js:54:16] [unknown] Process versions: {"node":"20.16.0","acorn":"8.11.3","ada":"2.8.0","ares":"1.31.0","base64":"0.5.2","brotli":"1.0.9","cjs_module_lexer":"1.2.2","cldr":"43.0","icu":"73.1","llhttp":"8.1.2","modules":"123","napi":"9","nghttp2":"1.61.0","openssl":"0.0.0","simdutf":"5.2.8","tz":"2024a","undici":"6.19.2","unicode":"15.0","uv":"1.46.0","uvwasi":"0.0.21","v8":"12.4.254.20-electron.0","zlib":"1.3.0.1-motley","electron":"30.5.1","chrome":"124.0.6367.243","microsoft-build":"10262041"}
2024-10-29 15:54:55.359 [info] [logger.js:59:20] [unknown] Manim notebook version: 0.0.4
2024-10-29 15:54:55.359 [info] [logger.js:70:16] [unknown] --------------------------
2024-10-29 15:55:04.478 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
2024-10-29 15:55:09.725 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
2024-10-29 15:55:10.316 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
2024-10-29 15:55:15.492 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
2024-10-29 15:55:36.381 [info] [extension.js:65:21] [activate] Manim Notebook activated
2024-10-29 15:55:36.381 [info] [logger.js:53:16] [unknown] Operating system: Darwin 23.6.0 arm64
2024-10-29 15:55:36.381 [info] [logger.js:54:16] [unknown] Process versions: {"node":"20.16.0","acorn":"8.11.3","ada":"2.8.0","ares":"1.31.0","base64":"0.5.2","brotli":"1.0.9","cjs_module_lexer":"1.2.2","cldr":"43.0","icu":"73.1","llhttp":"8.1.2","modules":"123","napi":"9","nghttp2":"1.61.0","openssl":"0.0.0","simdutf":"5.2.8","tz":"2024a","undici":"6.19.2","unicode":"15.0","uv":"1.46.0","uvwasi":"0.0.21","v8":"12.4.254.20-electron.0","zlib":"1.3.0.1-motley","electron":"30.5.1","chrome":"124.0.6367.243","microsoft-build":"10262041"}
2024-10-29 15:55:36.381 [info] [logger.js:59:20] [unknown] Manim notebook version: 0.0.4
2024-10-29 15:55:36.381 [info] [logger.js:70:16] [unknown] --------------------------
2024-10-29 15:55:37.373 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
VladimirFokow commented 3 days ago

clear didn't help either:

2024-10-29 15:59:05.419 [info] [extension.js:65:21] [activate] Manim Notebook activated
2024-10-29 15:59:05.419 [info] [logger.js:54:16] [unknown] Operating system: Darwin 23.6.0 arm64
2024-10-29 15:59:05.419 [info] [logger.js:55:16] [unknown] Process versions: {"node":"20.16.0","acorn":"8.11.3","ada":"2.8.0","ares":"1.31.0","base64":"0.5.2","brotli":"1.0.9","cjs_module_lexer":"1.2.2","cldr":"43.0","icu":"73.1","llhttp":"8.1.2","modules":"123","napi":"9","nghttp2":"1.61.0","openssl":"0.0.0","simdutf":"5.2.8","tz":"2024a","undici":"6.19.2","unicode":"15.0","uv":"1.46.0","uvwasi":"0.0.21","v8":"12.4.254.20-electron.0","zlib":"1.3.0.1-motley","electron":"30.5.1","chrome":"124.0.6367.243","microsoft-build":"10262041"}
2024-10-29 15:59:05.419 [info] [logger.js:59:20] [unknown] Manim notebook version: 0.0.4
2024-10-29 15:59:05.419 [info] [logger.js:70:16] [unknown] --------------------------
2024-10-29 15:59:09.870 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
2024-10-29 15:59:15.481 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
2024-10-29 15:59:16.165 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
2024-10-29 15:59:21.501 [info] [extension.ts:71:9] [unknown] 💠 Manim Notebook extension deactivated
2024-10-29 15:59:24.394 [info] [extension.js:65:21] [activate] Manim Notebook activated
2024-10-29 15:59:24.394 [info] [logger.js:54:16] [unknown] Operating system: Darwin 23.6.0 arm64
2024-10-29 15:59:24.394 [info] [logger.js:55:16] [unknown] Process versions: {"node":"20.16.0","acorn":"8.11.3","ada":"2.8.0","ares":"1.31.0","base64":"0.5.2","brotli":"1.0.9","cjs_module_lexer":"1.2.2","cldr":"43.0","icu":"73.1","llhttp":"8.1.2","modules":"123","napi":"9","nghttp2":"1.61.0","openssl":"0.0.0","simdutf":"5.2.8","tz":"2024a","undici":"6.19.2","unicode":"15.0","uv":"1.46.0","uvwasi":"0.0.21","v8":"12.4.254.20-electron.0","zlib":"1.3.0.1-motley","electron":"30.5.1","chrome":"124.0.6367.243","microsoft-build":"10262041"}
2024-10-29 15:59:24.394 [info] [logger.js:59:20] [unknown] Manim notebook version: 0.0.4
2024-10-29 15:59:24.394 [info] [logger.js:70:16] [unknown] --------------------------
2024-10-29 15:59:32.725 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
Splines commented 3 days ago

Just to make sure it's not a caching issue, could you try again now with the new changes?

I also wonder if this is just a caching issue while developing the extension or also when the extension is deployed and we use it from the marketplace.

If this still doesn't work, we have to be more "brute-force" and delete the file on the computer. I mean, we know exactly where the file is living, so we could program the extension such that it deletes that file upon deactivation. But if possible, I'd like to avoid that.

VladimirFokow commented 3 days ago

doesn't work

not with dispose();, not with clear()

2024-10-29 16:15:39.093 [info] [extension.js:65:21] [activate] Manim Notebook activated
2024-10-29 16:15:39.093 [info] [logger.js:54:16] [unknown] Operating system: Darwin 23.6.0 arm64
2024-10-29 16:15:39.093 [info] [logger.js:55:16] [unknown] Process versions: {"node":"20.16.0","acorn":"8.11.3","ada":"2.8.0","ares":"1.31.0","base64":"0.5.2","brotli":"1.0.9","cjs_module_lexer":"1.2.2","cldr":"43.0","icu":"73.1","llhttp":"8.1.2","modules":"123","napi":"9","nghttp2":"1.61.0","openssl":"0.0.0","simdutf":"5.2.8","tz":"2024a","undici":"6.19.2","unicode":"15.0","uv":"1.46.0","uvwasi":"0.0.21","v8":"12.4.254.20-electron.0","zlib":"1.3.0.1-motley","electron":"30.5.1","chrome":"124.0.6367.243","microsoft-build":"10262041"}
2024-10-29 16:15:39.093 [info] [logger.js:59:20] [unknown] Manim notebook version: 0.0.4
2024-10-29 16:15:39.093 [info] [logger.js:70:16] [unknown] --------------------------
2024-10-29 16:15:45.034 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
2024-10-29 16:15:48.465 [info] [extension.ts:71:9] [unknown] 💠 Manim Notebook extension deactivated
2024-10-29 16:15:52.009 [info] [extension.js:65:21] [activate] Manim Notebook activated
2024-10-29 16:15:52.009 [info] [logger.js:54:16] [unknown] Operating system: Darwin 23.6.0 arm64
2024-10-29 16:15:52.009 [info] [logger.js:55:16] [unknown] Process versions: {"node":"20.16.0","acorn":"8.11.3","ada":"2.8.0","ares":"1.31.0","base64":"0.5.2","brotli":"1.0.9","cjs_module_lexer":"1.2.2","cldr":"43.0","icu":"73.1","llhttp":"8.1.2","modules":"123","napi":"9","nghttp2":"1.61.0","openssl":"0.0.0","simdutf":"5.2.8","tz":"2024a","undici":"6.19.2","unicode":"15.0","uv":"1.46.0","uvwasi":"0.0.21","v8":"12.4.254.20-electron.0","zlib":"1.3.0.1-motley","electron":"30.5.1","chrome":"124.0.6367.243","microsoft-build":"10262041"}
2024-10-29 16:15:52.009 [info] [logger.js:59:20] [unknown] Manim notebook version: 0.0.4
2024-10-29 16:15:52.009 [info] [logger.js:70:16] [unknown] --------------------------
2024-10-29 16:15:53.651 [info] [extension.ts:51:11] [unknown] 💠 Command requested: Open Log File
VladimirFokow commented 3 days ago

In the next month(s) ahead - maybe me and bhoov can find the correct solution, until then, I'm sorry I currently can't invest much time here, thank you for understanding..

Splines commented 2 days ago

I came up with a new strategy to handle the logging and updated the PR comment accordingly. Ready for a fresh new review. I'm keen to know if this finally works on MacOS as well (it should).

VladimirFokow commented 2 days ago

Everything works!

This is really amazing! Thank you so much @Splines , this strategy looks and works awesome!

VladimirFokow commented 2 days ago

(I've improved some wording)