denosaurs / wait

🌀 Minimal terminal spinner
https://deno.land/x/wait
MIT License
60 stars 5 forks source link

feat(logging.ts, mod.ts): add console interception to stop spinner while logging and resume after logging is done #15

Closed jupegarnica closed 1 year ago

jupegarnica commented 1 year ago

This change adds a new feature to the spinner module that allows it to intercept console methods and stop the spinner while logging is being done. This is useful to avoid the spinner animation interfering with the logs. After the logging is done, the spinner resumes its animation. The feature is enabled by default but can be disabled by setting the interceptConsole option to false. The logging.ts file is an example of how to use this feature.