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
completely silent startup, for use when scripting #840
Comments
The part about configuring logging is included in #806 (might not be obvious, but it is). There was a good point a while ago on the mailing list about sending logging to stderr, which I think would be the best fix for this. |
If github supported voting, I'd vote for this one :) |
@copumpkin the approach, the outcome, both? |
The outcome, mostly. Separating stderr and stdout is also useful for other reasons, of course. Not sure whether this was implied in the thread, but it also seems helpful for warn/error messages to go to stderr and everything else to go to stdout. |
The thread indicated all logging should go to stderr, with the preemptive point that stderr is something of a misnomer and isn't just for errors. |
fwiw, I'd certainly be much happier if the stdout/stderr distinction were made, but some part of me would still want the option to set the loglevel at startup from the command line, so that irrelevant output never arises in the first place, on either stream. it's the unix way. printing dull stuff to stderr causes the user to either visually/mentally tune out the chatter, or forcibly tune it out by redirecting stderr to /dev/null, and either way the result is that when one day sbt does have something different or important to say, they're likely to miss it. |
The startup part is covered by the other issue. I've commented there so you believe me this time. All logging-warnings, errors, info- would go to stderr. It isn't just errors or just info. So, you'd only tune it out if you were redirecting stderr so you don't see it. And if you do that, you probably meant to do it. I don't think it would change much for people using it normally/interactively. |
loud & clear this time, thanks :-) |
Redirecting stderr to /dev/null sounds like a bad idea in 99% of cases. But IIUC, the "seeing only errors" use case — the one I'd prefer for continuous integration — would be supported through the other issue (#806), which is fine. But please correct my understanding if wrong. |
the more annoying lines on startup are all the resolving lines, which really pollute CI runs. Putting this in the project's build config seems to silence Ivy a little bit, but putting it in the meta project (i.e. ivyLoggingLevel := UpdateLogging.Quiet |
this reminds me of a related problem: |
@jsuereth is there a plan for this now? It's one of those things (think we discussed at an NEScala event) that still makes SBT just unfriendly to scripting? |
I'd like to suggest that logging messages and all other informational messages are redirected to stderr, not stdout. The main reason lies behind the ability of writing Scala Scripts, which would send useful output to stdout. |
Not sure im clear on the fix here. I have a CI build that could really use the output from
I'm using sbt 0.13.13. Should I be using a newer version of sbt? |
@willis7 yes, 0.13.13 is quite old. please try 0.13.17 or, even better since the 0.13.x series is in maintenance mode these days, try 1.1.6 |
@SethTisue sorry to labour this one. I've tried a few things now; upgrade to 0.13.17 (any higher and I get breaks I'm not qualified enough to fix) and read the issue you linked, but i still get:
I've tried adding |
@willis7 I'm not able to reproduce the problem on either 0.13.17 or 1.1.6: 1.1.6:
0.13.17:
the |
@SethTisue , what do you get if you remove the |
@willis7 without |
Its bizzare to me that I call a task asking for the version, and I get loads of unwanted logging information. It makes the task useless for any scripting tasks (unless I pipe to an elaborate squence of cmd tools). This is what I want:
Why does sbt make this so difficult? |
Because it's built with its interactive shell as the primary use. I'm not sure (at this time) how we might change sbt such that However, let's do so in a new issue, instead of necro-ing this one (we can always link to either the original request here and/or your recent comments). |
it's also often desirable to add so a typical full invocation in a script is:
|
sbt always prints these lines when it starts:
Is there a way to make it not? It messes up trying to pipe the output of commands around in the Unix shell.
this was requested on the mailing list https://groups.google.com/d/msg/simple-build-tool/VZFLPc-TWPw/2B6jx5Y_JF0J and at the time @harrah suggested opening a ticket, but I couldn't find one
related: #316, which was about overall levels of noisiness. this ticket is about being able to reduce noise all the way to zero when desired.
The text was updated successfully, but these errors were encountered: