feat: add status in quiet log level#2235
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2235 +/- ##
=========================================
+ Coverage 93.88% 93.9% +0.01%
=========================================
Files 34 34
Lines 1276 1279 +3
Branches 366 367 +1
=========================================
+ Hits 1198 1201 +3
Misses 71 71
Partials 7 7
Continue to review full report at Codecov.
|
|
Looks like it should work, but needs tests. |
|
Added tests for quiet flag. |
hiroppy
left a comment
There was a problem hiding this comment.
I'll fix this problem in the next version without webpack-log.
|
@evilebottnawi @hiroppy Not vital but do you want this in the test? #2235 (comment) I can add this |
|
@Loonride let's do it, maybe we can do this after merge? |
Yes |
|
Sorry guys, I am having my university exams this month. |
No worries, we want to do release soon so I can do the small test change. |
|
|
||
| // TODO: don't emit logs when webpack-dev-server is used via Node.js API | ||
| function status(uri, options, log, useColor) { | ||
| if (options.quiet === true) { |
There was a problem hiding this comment.
does this mean that there is now no way to silence these extra logs when using in node api?
There was a problem hiding this comment.
yes, this log should be outputted always, in future we will use webpack logger and you can filter this output
There was a problem hiding this comment.
that would be great. this seems like a regression IMO. we now have an extra set of console output. if possible when the webpack logger option is available would be great to link that to this issue.
There was a problem hiding this comment.
You can use custom logger as workaround
There was a problem hiding this comment.
link to documentation? not sure what you mean.
There was a problem hiding this comment.
I am facing this as well. I use webpackbar and this extra console log noise actually make it weird because webpackbar tries to clear screen when showing the fancy bar
Can we add an option to hide this output ? I'm sure many packages that use webpackbar is affected by this unknowingly :(
cc my team @yangshun
Update: We have adjusted to wds so whether to hide the output/not no longer matter to us 😂
There was a problem hiding this comment.
pretty pretty please? this output decreases dev experience IMO.
There was a problem hiding this comment.
Feel free to send a PR with new option
There was a problem hiding this comment.
This reverts #1486 and I believe it to now be a breaking change.
this log should be outputted always
Sorry, strongly disagree. What's the point of the option if it doesn't do what it says? I understand the custom logger is just a documentation issue right now, but it still points to quiet (and noInfo) being pointless/improperly named
There was a problem hiding this comment.
You actually can't fix this with a custom logger, because this setup noise is printed by utils/status.js directly, which is where this log override is happening. There's no intermediary step
|
it seems like not a lot of people want this change. how can we get it back to be what it was? |
|
It is really frustrating finding out that currently these no way to silence these extra logs when using in node api 😭 |
For Bugs and Features; did you add new tests?
Motivation / Use-Case
fixes #2233
Breaking Changes
May break some tests
Additional Info