yarn icon indicating copy to clipboard operation
yarn copied to clipboard

Feature Request: --quiet flag (--silent but still output warnings and errors)

Open joshuapinter opened this issue 4 years ago • 9 comments

First off, I'd like to say that I will write the PR for this if it's something that gets support from the core team.

Now that that's out of the way, let's get on with the feature request.

I dislike all of the output and noise that comes with running any yarn command, including the command that's being run, the version number, the time in seconds, etc.

I was using the --silent flag in .yarnrc but the trouble with that is it suppresses all warnings and errors. So in the rare occurrence where things do go wrong, you're left with a blank terminal prompt.

What I would like is a --quiet flag (or something similar) that hides all of the typically output, like yarn install v1.22.10 and ✨ Done in 141.00s. but still shows any warnings or errors that appears.

Is there any interest in this? If so, let's work out the details and then I can get started on the PR.

Thanks!

joshuapinter avatar Feb 03 '21 18:02 joshuapinter

As a workaround I think you could do this with yarn install > /dev/null on unix/osx. The warnings and errors print to stderr which is not redirected.

rally25rs avatar Apr 02 '21 23:04 rally25rs

@rally25rs Thanks. Yeah, you're prolly right. Just wish there was a nicer way to configure this. I'm surprised more people aren't asking for this. Again, if there's enough interest, I'll write the PR myself for this.

joshuapinter avatar Apr 03 '21 03:04 joshuapinter

Want to have this feature too. Yarn 3 produce a huge amount of noise in logs. Im my case my log file has 9000 lines and 7800(!) of them is yarn 3 log. Mostly contains can't be found in the cache lines

edikdeisling avatar Jan 19 '22 08:01 edikdeisling

I wish there was a feature like that

shuai4983958 avatar Apr 24 '22 11:04 shuai4983958

@edikdeisling you can use Yarn 3's log filtering features, but regardless, this feature request is for classic.

RDIL avatar Sep 07 '22 16:09 RDIL

@RDIL Oh interesting. We're on Yarn 3 now so how do you suggest using the log filtering to solve this?

joshuapinter avatar Sep 07 '22 17:09 joshuapinter

Just filter out any logs with the info level.

RDIL avatar Sep 07 '22 18:09 RDIL