"Quiet" mode

2,914 views
Skip to first unread message

Onath Claridge

unread,
Jul 15, 2015, 7:53:05 PM7/15/15
to bazel-...@googlegroups.com
Is there a way to get Bazel to suppress all of its own output? The options "--show_result 0 --noshow_progress" get rid of a lot of the output, but I still get INFO logs at both extreme values for the --logging flag.

Kristina Chodorow

unread,
Jul 16, 2015, 3:42:18 AM7/16/15
to Onath Claridge, bazel-...@googlegroups.com
No, but we can add it!  Filed https://github.com/google/bazel/issues/309 for it.

On Wed, Jul 15, 2015 at 7:53 PM, Onath Claridge <clar...@google.com> wrote:
Is there a way to get Bazel to suppress all of its own output? The options "--show_result 0 --noshow_progress" get rid of a lot of the output, but I still get INFO logs at both extreme values for the --logging flag.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/3d5841f3-7ae7-4afc-8dd0-476532ced3aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Onath Claridge

unread,
Jul 16, 2015, 11:37:14 AM7/16/15
to Kristina Chodorow, bazel-...@googlegroups.com
Thanks!

Onath Claridge

unread,
Jul 16, 2015, 11:53:07 AM7/16/15
to bazel-...@googlegroups.com, kcho...@google.com
Also, is there a reason that all of Bazel's logging goes to stderr? I'd expect informational messages to go to stdout, with stderr used only for errors and warnings.

Kristina Chodorow

unread,
Jul 21, 2015, 3:49:30 PM7/21/15
to Onath Claridge, bazel-...@googlegroups.com

Kristina Chodorow

unread,
Jul 21, 2015, 3:50:17 PM7/21/15
to Onath Claridge, bazel-...@googlegroups.com, Ulf Adams
Not sure about the reasons behind using stderr, adding Ulf to weigh in.

sean....@tri.global

unread,
Aug 3, 2017, 2:33:36 PM8/3/17
to bazel-discuss, clar...@google.com, ulf...@google.com
I don't see that the --output_filter flag addresses the OP. The INFO data is still written to stderr. I understand the goal is to have it run completely silently -- so there are *no* bazel artifacts written to the output streams. I would also like this functionality. I can (in some contexts) finesse it by redirecting stderr to garbage, but this isn't always available to me. It would be much better if I could just tell bazel to run quiet.

Ulf Adams

unread,
Aug 7, 2017, 3:25:52 AM8/7/17
to sean....@tri.global, bazel-discuss, clar...@google.com
On Thu, Aug 3, 2017 at 8:33 PM, <sean....@tri.global> wrote:
On Tuesday, July 21, 2015 at 12:50:17 PM UTC-7, Kristina Chodorow wrote:
> Not sure about the reasons behind using stderr, adding Ulf to weigh in.
>
>
> On Tue, Jul 21, 2015 at 3:49 PM, Kristina Chodorow <kcho...@google.com> wrote:
>
> If you sync past https://github.com/google/bazel/commit/2d93a47d97fbe2c2a95a03a17cf46b1e09acc910, --output_filter should be supported.  See http://bazel.io/docs/bazel-user-manual.html#flag--output_filter for documentation.
>
>
>
>
> On Thu, Jul 16, 2015 at 11:53 AM, Onath Claridge <clar...@google.com> wrote:
>
> Also, is there a reason that all of Bazel's logging goes to stderr? I'd expect informational messages to go to stdout, with stderr used only for errors and warnings.

We use stdout for data that can be piped to another process. For example, bazel query outputs the results to stdout. Everything else goes to stderr. This is intended to be consistent with 'the unix way' (tm). That said, I'm not 100% sure how consistently we apply this, and it's also not clear what output of bazel build or bazel test is useful in a pipe.
 

I don't see that the --output_filter flag addresses the OP. The INFO data is still written to stderr. I understand the goal is to have it run completely silently -- so there are *no* bazel artifacts written to the output streams. I would also like this functionality. I can (in some contexts) finesse it by redirecting stderr to garbage, but this isn't always available to me. It would be much better if I could just tell bazel to run quiet.

Why is redirecting stderr to /dev/null a problem?

Sean Curtis

unread,
Aug 7, 2017, 9:52:18 AM8/7/17
to Ulf Adams, bazel-discuss, clar...@google.com
Thanks for the quick response.

The particular context in which I'm trying run this is in CLion. We've got various tools configured to run via `bazel run` (in particular, linting tools). CLion has a mechanism for executing external processes and dumping their outputs to an internal console. In that console, it attempts to color the text based on its stream. So, the normal usage arrives as red text, and error code arrives as white text.  Not the end of the world. However, redirecting outputs in this pseudo-context doesn't work. So, it's a very limited, magical context.  I'm trying to address this in multiple ways.

1. Get jetbrains to beef up their external tools.
2. Get options in bazel so I can suppress output I don't care about.
3. Simply wrap the thing in *another* executable and have *that* suppress the undesired outputs. I'm currently using this but I'd rather *not* have to increase the number of artifacts.


Ulf Adams

unread,
Aug 9, 2017, 12:02:18 PM8/9/17
to Sean Curtis, bazel-discuss, clar...@google.com
That's fair. How about filing a feature request and we continue the discussion there? Did you also post an issue with jetbrains - if so, can you provide a link?
Reply all
Reply to author
Forward
0 new messages