Choose one: is this a ๐ bug report or ๐ feature request?
๐ feature request
It's impossible to debug an issue or to show anyone if I can't see what's happening. All logging messages are replaced one the build is done.
parcel watch
$ parcel watch --verbose
Server running at http://localhost:1234
โณ Building index.html...
โณ Building index.js...
โจ Built in 3.78s.
โณ Building index.js...
โจ Built in 0.78s.
โณ Building index.html...
โจ Built in 0.1s.
$ parcel watch
Server running at http://localhost:1234
โจ Built in 3.78s.
# what happened?! what did it do?
Mostly for debugging purposes
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.6.2
| Node | 8.6.0
| npm/Yarn | 5.7.1
| Operating System | macOS 10.13.3
This should be VERY easy to implement ๐ ๐ ๐
We already have an option called logLevel that we use internally. So it's just a matter of exposing that in src/cli.js.
The easiest way to do it is to make the CLI option called --logLevel [level] which would just take the that level as a parameter directly (however this would probably require us to document how those log levels actually work).
If you just add that to the commands in src/cli.js, it should just automatically start working, since the code that parses that option already exists ๐
@davidnagli We don't have a verbose level though, this would require someone to add an extra level to the loglevel value for example go up to lvl 4 instead of 3, 4 being verbose
@DeMoorJasper How is lvl 3 different from the verbose mode that @bfred-it is describing?
What would be new in lvl 4?
If i understand correctly the difference would be that it prints everything (like not overwriting status but just taking a newline every time)
Gochya ๐
We should probably document the log levels somewhere. From what I pieced together:
| logLevel | Behavior |
| ------- | ---------- |
| 0 | No output
| 1 | Errors
| 2 | Warnings + Errors
| 3 | All
| 4 | [Proposed] Verbose
Is this issue still being worked on? I'd be interested in starting to contribute too this project and this seems like a good starting point.
@TomVance #1385 is the PR that contains the verbose output and also a log file generation. If you find something there that is missing feel free to contribute based on the PR. ๐
This would be super helpful! Two engs here (myself included) just spent a day trying to figure out _when_ our Parcel build was hanging โ as in, which file it was hung up on. Without an option to capture the output, we had no insight.
(Side note: It turned out to be a node-sass absolute vs relative import problem on an ubuntu:trusty Docker image, which we'd also like to submit an issue for but haven't figured out how to reliably reproduce the environment for you yet.)
I'll open up a new PR that does the same as my current one but without any log calls, as I haven't had the chance to reliably performance test the difference (and there are a couple merge conflicts)
So once I add --log-level 2 to my start script, where CAN I SEE IT?
Is it written to a file, & if so, WHERE?
Most helpful comment
So once I add --log-level 2 to my start script, where CAN I SEE IT?
Is it written to a file, & if so, WHERE?