facebook / jscodeshift

A JavaScript codemod toolkit.
https://jscodeshift.com
MIT License
9.23k stars 477 forks source link

Logging could be better for very large projects #335

Open NickHeiner opened 5 years ago

NickHeiner commented 5 years ago

I have a project with thousands of files. When I run a codemod across all of them, the terminal output looks like this:

image

When the entire terminal screen is filled with the same Sending 50 files to free worker... message, I can't tell if new lines are being created or not, because they're all the same.

Potential solution: prefix each line with a counter. Or add some other information that will change on each log line:

[0] Sending 50 files to free worker...
[1] Sending 50 files to free worker...
[2] Sending 50 files to free worker...

or

Sending 50 files to free worker... (8000 remaining)
Sending 50 files to free worker... (7950 remaining)
Sending 50 files to free worker... (7900 remaining)
sibelius commented 2 years ago

I think verbose=0 should also remove this log

ElonVolo commented 2 years ago

Is the repository with the thousands of files an open source project (so I can see the error in action) or is it something private?

NickHeiner commented 2 years ago

You can run a codemod on any large OSS project to repro this. :)

On Thu, May 26, 2022 at 23:52 Elon Volo @.***> wrote:

Is the repository with the thousands of files an open source project (so I can see the error in action) or is it something private?

— Reply to this email directly, view it on GitHub https://github.com/facebook/jscodeshift/issues/335#issuecomment-1139093302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGKTA54IJMAV4NQJYLV2OLVL7XDVANCNFSM4IG66ZFA . You are receiving this because you authored the thread.Message ID: @.***>