Skip to content
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

Init Log Recording sessions #59

Merged
merged 20 commits into from
Oct 30, 2024
Merged

Init Log Recording sessions #59

merged 20 commits into from
Oct 30, 2024

Conversation

Splines
Copy link
Member

@Splines Splines commented Oct 29, 2024

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:

  • After you exit the logging session, the log file should be shown in the VSCode editor, as well as in your OS explorer, e.g. the Windows Explorer or MacOS Finder. This allows users to just drag and drop that file (and not the file content) into a new GitHub issue).
  • After having recorded one logging sessions, when you start a new one and stop it, you should only see the log messages from the second sessions. That is, the log file should be cleared before every log session start.
  • When you start a logging session while one is already running, an information message should be shown.
  • Try the following: record a log session, then end it. Your OS explorer should show the log file. Then manually delete this log file. Now try to start a new log session and an error should show proposing you to restart the VSCode window. After doing to, everything should work normally again (-> try to start and end another logging session).
  • Record and end a log session. Keep the log file open. Now do something else with Manim and the logger shouldn't write anything to the log file. It should only append to it whenever we record a log session.

@Splines Splines requested a review from VladimirFokow October 29, 2024 14:51
@Splines Splines self-assigned this Oct 29, 2024
@VladimirFokow
Copy link
Collaborator

VladimirFokow commented Oct 29, 2024

dispose didn't help:

  • you can see - the reactivation is logged into the same log file:
  • (btw, I like the new logging of system info !)
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
Copy link
Collaborator

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

@VladimirFokow VladimirFokow marked this pull request as draft October 29, 2024 15:08
@Splines
Copy link
Member Author

Splines commented Oct 29, 2024

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
Copy link
Collaborator

VladimirFokow commented Oct 29, 2024

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
Copy link
Collaborator

VladimirFokow commented Oct 29, 2024

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 Splines changed the title Dispose logger & log system information Init Log Recording sessions Oct 30, 2024
@Splines Splines marked this pull request as ready for review October 30, 2024 15:01
@Splines Splines requested a review from bhoov October 30, 2024 15:01
@Splines
Copy link
Member Author

Splines commented Oct 30, 2024

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
Copy link
Collaborator

VladimirFokow commented Oct 30, 2024

Everything works!

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

@VladimirFokow
Copy link
Collaborator

VladimirFokow commented Oct 30, 2024

(I've improved some wording)

@Splines Splines merged commit 8d2b88c into main Oct 30, 2024
@Splines Splines deleted the fix/logger-reloading-and-version branch October 30, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants