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

Extra logging (was: verbose flag?) #720

Closed
thetayloredman opened this issue Apr 10, 2022 · 6 comments
Closed

Extra logging (was: verbose flag?) #720

thetayloredman opened this issue Apr 10, 2022 · 6 comments

Comments

@thetayloredman
Copy link

I have a slow system and would like to have a verbose flag which shows all of the things being done (extracting, and adds -v to tar or whatever -- copying, adds -v, etc)

@shadowspawn
Copy link
Collaborator

So you can see progress all the time? (Rather than to debug it once and see if there is anything you can fix?)

Of interest on a slow system: for switching just node (and not npm) with versions you have already downloaded, you may find using --preserve makes it way faster. Most of the files being copied are npm related.

@thetayloredman
Copy link
Author

thetayloredman commented Apr 10, 2022 via email

@shadowspawn
Copy link
Collaborator

I gave this a quick try, but think adding -v is too noisy to be useful in practice. Both tar and cp just list the files as they process them. There isn't a fancy one-line progress like with curl.

Adding -v to the tar command produces over 3000 lines of output. The download progress is mixed with the extraction, since happening at same time.

Adding -v to the cp in (just) clean_copy_folder produces over 2000 lines of output.

@shadowspawn
Copy link
Collaborator

There isn't a log message before the copy starts. That is a possibility. Doubles the lines of output in the already-downloaded case, but displays something before the pause while it copies.

% n 10
  installing : node-v10.24.1
       mkdir : /usr/local/n/versions/node/10.24.1
       fetch : https://nodejs.org/dist/v10.24.1/node-v10.24.1-darwin-x64.tar.xz
     copying : node/10.24.1
   installed : v10.24.1 (with npm 6.14.12)
% n 10
     copying : node/10.24.1
   installed : v10.24.1 (with npm 6.14.12)

@thetayloredman
Copy link
Author

@shadowspawn That would be perfect for my use case. I have a Proxmox VE hypervisor with over 11 node-based guests I wanted to bulk update and I went ahead and ran that on each... and they all seemed to hang during the copy phase. Just a little log like 'extracting' even works

Also: spaces don't go before colons: I don't know why N's logs look : like : this.

However, you could count up the total files and pipe to pv or something similar for progress...

@shadowspawn shadowspawn changed the title verbose flag? Extra logging (was: verbose flag?) Apr 16, 2022
@shadowspawn
Copy link
Collaborator

Released v8.2.0 with extra log line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants