diff options
Diffstat (limited to 'src/main/java/com/google/devtools')
2 files changed, 26 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java index bc806be07c..b0ca6d72f8 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java @@ -20,6 +20,7 @@ import static com.google.devtools.build.lib.buildeventservice.BuildEventServiceT import static java.lang.String.format; import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions; @@ -218,11 +219,20 @@ public abstract class BuildEventServiceModule<T extends BuildEventServiceOptions logger.fine(format("Will create BuildEventServiceTransport streaming to '%s'", besOptions.besBackend)); - commandLineReporter.handle( - Event.info( - format( - "Streaming Build Event Protocol to %s build_request_id: %s invocation_id: %s", - besOptions.besBackend, buildRequestId, invocationId))); + final String message; + if (!Strings.isNullOrEmpty(besOptions.besResultsUrl)) { + String url = + besOptions.besResultsUrl.endsWith("/") + ? besOptions.besResultsUrl + : besOptions.besResultsUrl + "/"; + message = "Streaming Build Event Protocol to " + url + invocationId; + } else { + message = + format( + "Streaming Build Event Protocol to %s build_request_id: %s " + "invocation_id: %s", + besOptions.besBackend, buildRequestId, invocationId); + } + commandLineReporter.handle(Event.info(message)); BuildEventTransport besTransport = new BuildEventServiceTransport( diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java index 0d1adae243..a6216ecf3a 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceOptions.java @@ -104,4 +104,15 @@ public class BuildEventServiceOptions extends OptionsBase { + "event, even if larger than the specified value." ) public long besOuterrBufferSize; + + @Option( + name = "bes_results_url", + defaultValue = "", + documentationCategory = OptionDocumentationCategory.LOGGING, + effectTags = {OptionEffectTag.TERMINAL_OUTPUT}, + help = + "Specifies the base URL where a user can view the information streamed to the BES" + + " backend. Bazel will output the URL appended by the invocation id to the" + + " terminal.") + public String besResultsUrl; } |