New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add --silent
back
#3542
Comments
The |
That makes sense. Except there's no way to toggle those on and off on demand, besides manually editing It'd be really useful if we could, say, make the CI logs silent but have every other logFilters:
- pattern: *
level: discard |
Environment configuration doesn't support complex variable types at the moment, but you can use the cli:
Btw, regarding the logs you shown, seems like most of them come from The |
Yeah - I'm aware of what the logs are saying. Thanks for pointing that out, but this is not what this issue is about, really. Like I mentioned before, the |
I'd like to use I don't want to blanket-silence all the time, but only for one specific use case, which (I don't think) is possible at the moment. |
Agree with @davwheat here. Environments such as Docker and CI/CD were the main use cases for the addition of @arcanis I've been thinking about this:
Isn't that the exact reason why it was useful in the first place? When applying this kind of logging control flags, like |
Isn't this exact behaviour achievable using Here are a couple of reasons why adding a
This isn't to say there aren't commands where a |
Hi! 👋 It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it. |
@bgotink Yeah, no. That's not really portable. |
I am just disabling annoying and meaningless messages: yarn config set logFilters --json '[
{
"code": "YN0007",
"level": "discard"
},
{
"code": "YN0008",
"level": "discard"
},
{
"code": "YN0013",
"level": "discard"
},
{
"code": "YN0018",
"level": "discard"
},
{
"code": "YN0019",
"level": "discard"
},
{
"code": "YN0061",
"level": "discard"
}
]' > /dev/null |
Describe the user story
IMO, this was an important feature, heavily requested for the original
yarn
. Not sure why it was taken out. Really useful for CI environments and a no-brainer for most CLI tools out there. As an example, this is how a fairly typical CI log would look for us, making it really hard to mentally parse and navigate.As far as I could gather,
--silent
was added as a "hidden" flag for compatibility purposes - but doesn't really do anything. This is bound to trip people up.Describe the solution you'd like
yarn --silent
should not print anything at all and return the appropriate status code.Describe alternatives you've considered
Right now, we are adding a bunch of general exclusions in
.yarnrc.yml
aslogFilters
for each project. Maybe those could be exposed as CLI flags?The text was updated successfully, but these errors were encountered: