facebook / facebook/jscodeshift

Logging could be better for very large projects

Open
#335 3 comments 2 reactions 0 assignees View on GitHub
improvement
Dominant language
JavaScript
Stars
10k
Forks
498
PR merge metrics
No merged PRs in 30d

Description

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

![image](https://user-images.githubusercontent.com/829827/61913425-eabb3700-aef1-11e9-9b66-9fb80dbda39b.png)

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)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.