diff options
author | brendandouglas <brendandouglas@google.com> | 2018-06-19 11:31:10 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-19 11:32:23 -0700 |
commit | b74922932b25a71c626b47ea9a9afb7dbc506cec (patch) | |
tree | 358fd68b19dac04a2b4ff3f0f08f4d96317e8910 /src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java | |
parent | 9f4d5fe77be3572e9632601842a62007ccfefef7 (diff) |
Add an option to show verbose debugging logs.
Turns out the event handler (BlazeCommandEventHandler) prints almost all
event types, and I don't believe there's a way to tune it.
We certainly don't want these messages printed to the console unless
we're debugging the debugger, so turn them off by default.
PiperOrigin-RevId: 201211355
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java b/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java index f85a24ed8e..ac6a4bb491 100644 --- a/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java @@ -41,7 +41,6 @@ import com.google.devtools.build.lib.skylarkdebugging.SkylarkDebuggingProtos.Thr import com.google.devtools.build.lib.syntax.BuildFileAST; import com.google.devtools.build.lib.syntax.DebugServerUtils; import com.google.devtools.build.lib.syntax.Environment; -import com.google.devtools.build.lib.syntax.Environment.FailFastException; import com.google.devtools.build.lib.syntax.Mutability; import com.google.devtools.build.lib.syntax.ParserInputSource; import com.google.devtools.build.lib.syntax.SkylarkList; @@ -52,7 +51,6 @@ import java.io.IOException; import java.net.InetAddress; import java.net.ServerSocket; import java.time.Duration; -import java.util.EnumSet; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -89,24 +87,6 @@ public class SkylarkDebugServerTest { DebugServerUtils.initializeDebugServer(server); } - @Before - public void setupEventHandler() { - // fail-fast treats 'debug' messages as errors. Replace with something that doesn't - events.setFailFast(false); - - EnumSet<EventKind> failOnEvents = EnumSet.copyOf(EventKind.ERRORS_AND_WARNINGS); - failOnEvents.remove(EventKind.DEBUG); - - events - .reporter() - .addHandler( - event -> { - if (failOnEvents.contains(event.getKind())) { - throw new FailFastException(event.toString()); - } - }); - } - @After public void shutDown() throws Exception { if (client != null) { |